Muli Ben-Yehuda's journal

June 9, 2004

the postfix bug that isn’t

Filed under: Uncategorized — Muli Ben-Yehuda @ 12:18 PM

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!

Advertisements

7 Comments »

  1. I’m sure Wietse had a reason for it!

    Comment by emre — June 9, 2004 @ 2:49 AM | Reply

    • I’m sure djb has a reason for everything he does. How is that an excuse? ๐Ÿ˜‰

      Comment by mulix — June 9, 2004 @ 2:58 AM | Reply

      • djb is also a crazy mathematician who uses two letter functions in his software. Oh, and did I mention he is crazy?

        Comment by emre — June 9, 2004 @ 3:06 AM

      • well, I can’t argue with what you said, but you also have to bring into account the fact that the man is crazy.

        Comment by mulix — June 9, 2004 @ 5:10 AM

  2. Cool – the power of Open Source
    One more advantage of Open Source – you have the power to figure out what exactly does the program actually do and see how it fits (or does not fit) in with the bigger picture.

    Comment by tddpirate — June 9, 2004 @ 2:51 AM | Reply

    • Re: Cool – the power of Open Source
      troubleshooting and debugging are two of the reasons I refuse to work on closed source systems.

      Comment by mulix — June 9, 2004 @ 2:59 AM | Reply

  3. For further assistance, please send mail to postmaster
    NOT EVERYONE has to LEARN ENGLISH to UNDERSTAND an error MESSAGE!! So admins should have the possibility to change postmaster to to their native language.

    Comment by Anonymous — July 9, 2004 @ 10:06 AM | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: