View Single Post
  #1 (permalink)  
Old 07-08-2008, 07:48 PM
linuxnewbie1234
 
Posts: n/a
mdadm mailer does not set envelope-from!

Hi all,
I want to receive an email from mdadm when something happens in the
arrays. I have configured both the MAILADDR and MAILFROM options in
mdadm.conf (see man).

I have configured the local mailserver to relay mail to our ISP
mailserver, and this works, unfortunately the ISP mailserver does not
accept that mail because the From address (in the envelope!) contains no
valid domain.

This is an internal machine of ours which we do not really want to
assign an existing domain to. I assumed that the MAILFROM field could
fix the bogus domain, as it is written in the manual
(from Debian man mdadm.conf)
---------
MAILFROM
The mailfrom line (which can only be abbreviated to at least 5
characters) gives an address to appear in the "From" address for alert
mails. This can be useful if you want to explicitly set a domain, as
the default from address is "root" with no domain.
---------

unfortunately the mailserver doesn't (just) look at the address in the
From field but also looks at the one specified in all the "Received:"
fields, and in particular the first one says:
---
Received: from root by machine.bogusdomain with local (Exim 4.69)
(envelope-from <root@machine.bogusdomain>) id 1KGHY7-0006m1-IeNV for
mdadm_event_notifier_alias@machine.bogusdomain; Tue, 08 Jul 2008
20:04:23+0200
---
and when the ISP mailserver sees this envelope-from address, the email
gets blocked.

I am able to send mails from the same host via commandline like this:

mail destination@address.com -s somesubject -- -f \
modified@sender.address.com

but mdadm apparently does not use this trick.

Does anybody know a workaround?

Can this be considered a bug in mdadm, given the manpage?

Thank you
Reply With Quote