Re: getaddr confusion
ed <[email protected]> Wed, 20 Apr 2016 14:01:54 +0100
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Apr 20, 2016 at 01:03:28PM +0100, Neil Romig wrote:
> I am using getaddr in .mailfilter to extract addresses:
>
> if( /^From:\s*(.*)/:h )
> {
> FRM=getaddr($MATCH1)
> }
> ...
> I guess the hyphen is causing trouble - is this a bug or am I failing
> to understand?
May I ask which MTA are you using? Personally, I have found the
following works ok and doesn't require parsing the (arguably) more
complex From: header.
import RECIPIENT
import SENDER
logfile "/home/username/maildrop.log"
log "$SENDER $RECIPIENT storing in inbox"
The benefit here is that the MTA should set SENDER and RECIPIENT
environments which maildrop can then read and use in the log statement.
Been using this for many years without problem.
--
Best regards,
Ed http://www.s5h.net/
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z