james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Sozonoff" <se...@globalbeach.com>
Subject [PATCH] FetchPOP changes
Date Tue, 07 Jan 2003 23:17:18 GMT
Hi,

As discussed in the "FetchPOP configuration change" thread, here is patch
which adds an additional config parameter to the FetchPOP block.

The config parameter looks like this:
<recipient ignorercpt-header="false">user@mydomain.com</recipient>

If ignorercpt-header = true then fetched mail will always be re-spooled with
the specified address as the envelope recipient.
If ignorercpt-header = false, the header is parsed as follows to try and
determine the envelope recipient to use when the mail is spooled
in James.

First the Received: header is parsed to try and find the "for" parameter, if
this fails the To: header is checked and if it contains only one recipient
then this is used as the new envelope recipient for the newly spooled mail.
If both of these fail, the specified recipient from the configuration
parameter is used.
It is possible to do additional checks to try and find who the original
recipient is and if I am going in the right direction with this I will look
at
maybe adding a few more possibilities. I have been reading about Fetchmail.

I have also added a failsafe to avoid mail loops, I simply count the number
of times the X-fetched-from header occurs and if it is more than three I
change the mail state to ERROR before spooling.

I welcome any feedback.

Thanks,
Sergei



Mime
View raw message