Re: Do not include first 'Received' header when received via 465/587?

2009-03-06 Thread Nate Carlson

On Fri, 6 Mar 2009, Noel Jones wrote:

Victor Duchovni wrote:

Probably want a : in there to make it a valid header:

header_checks.pcre:
if /^Received:/
/\n\tby (smtp\.example\.com \(Postfix\) with ESTMPS?A id \w+)/
REPLACE X-Submitted: to $1
endif


Yes, thanks.


I extrapolated from this, and got something that works perfectly - thanks 
so much!


if /^Received:/
/.*by (hostname \(Postfix\) with ESMTPS?A).*/
REPLACE X-Submitted: to $1
endif

My servers do additional processing, and add received headers after this, 
so no issues with spam filters (as mentioned later in this thread.)


Appreciate the help!


Do not include first 'Received' header when received via 465/587?

2009-03-05 Thread Nate Carlson

Hi,

I have a client that I have set up the submission port and 465 (for 
submission over raw SSL). They use many different internet connections, 
and a few of them (Panera Bread in particular) have their IP on 
blacklists. Because the IP gets included in the first Received header from 
Postfix, some sites are catching the mail as spam (apparently some sites 
scan all 'Received' headers for DNSBL's? Sigh.)


I've found tricks to remove or edit Received headers for specific IP's via 
'header_checks'; however, what I'd like to be able to do is either remove 
the header altogether or modify the IP to one of the IP's that we own for 
all authenticated users that submit mail via 465/587. I'm not finding a 
clean way of doing this; hoping someone has been down this road before so 
I don't have to reinvent the wheel.  ;)


Appreciate any advice - thanks much!

-Nate


Re: Do not include first 'Received' header when received via 465/587?

2009-03-05 Thread Nate Carlson

On Thu, 5 Mar 2009, Wietse Venema wrote:

I've found tricks to remove or edit Received headers for specific IP's via
'header_checks'; however, what I'd like to be able to do is either remove
the header altogether or modify the IP to one of the IP's that we own for
all authenticated users that submit mail via 465/587.


$ man header_checks | less +/IGNORE
$ man header_checks | less +/REPLACE


Thanks.. I've got that, but I'm not finding a way to only match mail that 
comes in via Submission, and not via regular SMTP. Is there a way to tell 
Postfix to only apply the header_checks to certain mail processes?


I suppose I could do something like 'no_header_body_checks' on the main 
SMTP process, but it'd be nice to be able to do some checks there in the 
future too.


-Nate


Set outgoing IP address based on sender e-mail address?

2009-02-14 Thread Nate Carlson

Hey all,

Sorry if this is a FAQ, I can't find anything about it online.

Is it possible to set the outgoing IP address of a locally-generated 
message based on the sender's e-mail address?


IE, if a message is submitted via 'pickup' with the sender address of 
'u...@example1.com', use the IP '192.168.100.10' for the outgoing IP 
address.


If a message is submitted via 'pickup' with the sender address of 
'u...@example2.com', use the IP '192.16.100.11' for the outgoing IP 
address.


Basically, in a virtual hosting environment, I'd like to ensure that mail 
sent via one user cannot affect another user's IP's 'reputation', and I'd 
also like the outgoing mail server to match the incoming MX record for the 
domain.


Thanks!

-Nate