preserve_luser_host does not work

Bug #1031803 reported by AlainKnaff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sendmail (Ubuntu)
New
Undecided
Unassigned

Bug Description

FEATURE(`preserve_luser_host') does not work: the "luser" relay's host name is still substituted in the destinator's email address.

1) # lsb_release -rd
Description: Ubuntu 10.04.4 LTS
Release: 10.04

2) # apt-cache policy sendmail-cf
sendmail-cf:
  Installed: 8.14.3-9.1ubuntu1
  Candidate: 8.14.3-9.1ubuntu1
  Version table:
 *** 8.14.3-9.1ubuntu1 0
        500 http://lu.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

3a) What I tried:
define(`LUSER_RELAY',`smtp:oldmail.piratepartei.lu')dnl
FEATURE(`preserve_luser_host')

3) What I expect to happen:
# sendmail -bv <email address hidden>
<email address hidden>... deliverable: mailer smtp, host oldmail.piratepartei.lu, user <email address hidden>

4) What happens instead:
# sendmail -bv <email address hidden>
<email address hidden>... deliverable: mailer smtp, host oldmail.piratepartei.lu, user <email address hidden>

Tags: patch
Revision history for this message
AlainKnaff (kubuntu-misc) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Workaround for this issue" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Attached is a proper fix, which also works in case of multiple local domain names.

Thanks to Andrzej Filip who described the fix here: http://comp.mailarchive.ca/mail.sendmail/2002-04/0596.html

It's just amazing how old that post is (2002!), and how that fix hasn't made it into the official sendmail distribution yet...

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Turns out that my second patch doesn't correctly handle aliases which expand to a non-existent local user, so in that case, my first patch may be preferable.

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

The reason why my first patch didn't work with aliases that expanded into a non-existant local user was because the right-hand side of the alias didn't have a host name.

t1: alainx => not OK, no hostname
t2: <email address hidden> => ok
t3: <email address hidden> => also ok

The new version of the patch now works in all cases:
1. If a local domain name is attached to the recipient, that one is used, so servers with multiple names in class w preserve the correct name
2. If a local domain name is not attached to the recipient, $j ("canonical" local host name) is used instead.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.