I just spent a couple of hours tweaking the postfix installation on my desktop
machine, alhambra. I got everything working to my satisfaction, and
then noticed that bounce messages contain the line “For further
assistance, please send mail to “. The bit
looks incorrect, since I would expect it to be a real email
address. I looked in HOWTOs, read the configuration files, searched
the web, and couldn’t find any way to tell postfix which address to
use. Eventually, I downloaded the source and verified that indeed
there is no way to set this particular string. In
src/bounce/bounce_notify_util.c, we have the line
post_mail_fprintf(bounce,
"For further assistance, please send mail to ",
MAIL_ADDR_POSTMASTER);
where MAIL_ADDR_POSTMASTER is defined in src/global/mail_addr.h as
#define MAIL_ADDR_POSTMASTER "postmaster"
#define MAIL_ADDR_MAIL_DAEMON "MAILER-DAEMON"
#define MAIL_ADDR_EMPTY ""
extern const char *mail_addr_double_bounce(void);
extern const char *mail_addr_postmaster(void);
Hmm, thinks I, perhaps MAIL_ADDR_POSTMASTER is a default and
mail_addr_postmaster() does the fully qualified domain name bit? let’s
see. src/global/mail_addr.c:
const char *mail_addr_postmaster(void)
{
static char *addr;
if (addr == 0)
addr = concatenate(MAIL_ADDR_POSTMASTER, "@",
var_myhostname, (char *) 0);
return (addr);
}
Couldn’t be much clearer than that. Looks like someone used
MAIL_ADDR_POSTMASTER rather than mail_addr_postmaster(). Not the sort
of silly bug I’d expect in postfix, but stranger things have
happened. Cool, a bug I can report and fix.
Well, let’s see where to report bugs in postfix. Nothing in the
source, no -devel mailing list. Maybe I should report it against the
debian package? Hmm, maybe one of the FAQs will have more information
on it? let’s try this one?. While
browsing through it, what do I see? When Postfix
sends a bounce message, it tells the sender, “For further assistance,
please send mail to…, which states:
4. When Postfix sends a bounce message, it tells the sender, "For
further assistance, please send mail to 'postmaster'" But I want it
to include my domain name in the address,
e.g. . How can I do that?
The idea behind this is that people who receive this notification
should contact their own local postmasters, since they may very well
be the ones who have to deal with the problem. If you really want to
change it, you have to modify the source code.
To which I have only one thing to say: D’oh!