Mail Delivery Using FILTER in access table
Hi All, I have a normal postfix setup with a external content filtering(amavis). I want to skip content filtering for some domains and send through a different IP. In my main.cf I have smtpd_sender_restriction = check_sender_access hash:/etc/postfix/access.cf Where access.cf contains the below line example.com FILTER csmtp:127.0.0.1 cstmp is a clone of smtp, and the corresponding entry in master.cf is csmtp unix- - n - 300 smtp -o smtp_bind_address=172.16.141.29 But when i try to send mail, I am getting connection refused error in logs. Log entries are Jan 2 03:20:18 postfix-test1 postfix/smtpd[29051]: NOQUEUE: filter: RCPT from unknown[172.16.134.61]: us...@example.com: Sender address triggers FILTER csmtp:127.0.0.1; from=us...@example.com to=us...@domain.com proto=SMTP Jan 2 03:20:18 postfix-test1 postfix/smtpd[29051]: 9F0EA31F01EE: client=unknown[172.16.134.61] Jan 2 03:20:30 postfix-test1 postfix/cleanup[29060]: 9F0EA31F01EE: message-id= Jan 2 03:20:30 postfix-test1 postfix/qmgr[29048]: 9F0EA31F01EE: from=us...@example.com, size=192, nrcpt=1 (queue active) Jan 2 03:20:30 postfix-test1 postfix/smtp[29063]: connect to 127.0.0.1[127.0.0.1]:25: Connection refused Jan 2 03:20:30 postfix-test1 postfix/smtp[29063]: 9F0EA31F01EE: to=us...@domain.com, relay=none, delay=22, delays=22/0/0/0, dsn=4.4.1, status=deferred connect to 127.0.0.1[127.0.0.1]:25: Connection refused) Machine has 2 ips: 172.16.141.29 and 172.16.141.28 Regards, Shameem
Re: Mail Delivery Using FILTER in access table
I tried with example.com FILTER csmtp:172.16.141.29 But still I have same error postfix/smtp[10526]: connect to 172.16.141.29[172.16.141.29]:25: Connection refused Regards, Shameem --- On Thu, 10/6/10, Wietse Venema wie...@porcupine.org wrote: From: Wietse Venema wie...@porcupine.org Subject: Re: Mail Delivery Using FILTER in access table To: Postfix users postfix-users@postfix.org Date: Thursday, 10 June, 2010, 10:23 PM Shameem Ahamed: smtpd_sender_restriction = check_sender_access hash:/etc/postfix/access.cf Where access.cf contains the below line example.com FILTER csmtp:127.0.0.1 cstmp is a clone of smtp, and the corresponding entry in master.cf is csmtp unix - - n - 300 smtp -o smtp_bind_address=172.16.141.29 That won't work when there is no path from 172.16.141.29 to 127.0.0.1. Wietse
Re: Mail Delivery Using FILTER in access table
So, is there any way to send mail using a different IP, other than running a separate postfix instance. Regrads, Shameem --- On Thu, 10/6/10, Noel Jones njo...@megan.vbhcs.org wrote: From: Noel Jones njo...@megan.vbhcs.org Subject: Re: Mail Delivery Using FILTER in access table To: postfix-users@postfix.org Date: Thursday, 10 June, 2010, 10:32 PM On 6/10/2010 11:59 AM, Shameem Ahamed wrote: I tried with example.com FILTER csmtp:172.16.141.29 But still I have same error postfix/smtp[10526]: connect to 172.16.141.29[172.16.141.29]:25: Connection refused The FILTER destination must accept mail. smtp is for sending mail. -- Noel Jones
Re: Add extra headers when forwarding
Hi Wietse, Yes you are correct. My browser was not showing those headers. Thanks for the prompt reply. Regards, Shameem --- On Tue, 23/2/10, Wietse Venema wie...@porcupine.org wrote: From: Wietse Venema wie...@porcupine.org Subject: Re: Add extra headers when forwarding To: Postfix users postfix-users@postfix.org Date: Tuesday, 23 February, 2010, 1:18 AM Shameem Ahamed: Yes it adds received header. But it doesn't add the user details. Received: from mx1 (INBOUNDSERVER [IPADDRESS]) by FORWARDSERVER (Postfix) with ESMTP id BA40E4940D6 for RECIPIENT; Thu, 18 Feb 2010 02:19:28 + (GMT) The recipient is HERE. If you don't see the recipient, then you use a BROKEN MAIL READER. Shameem Ahamed: I am seeing just ';' in that place. Am i doing anything wrong ?. Yes. You are using a BROKEN MAIL READER. Namely, a mail reader that processes plain text email as if it is HTML, and that removes all text that looks like an HTML tag (such as the recipient address in a Postfix Received: header. If you examine this thread via one of the on-line websites that archive this mailing list, then you will understand what I mean. Wietse The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Add extra headers when forwarding
Hi All, I have one postfix mail server, and a forward server. The mail server accepts all the mails, and forwards mails to the forward server if the mail is a forward. Currently, when the postfix forwards the mails to the forward server it is not adding any headers for the e-mail for which it forwards. I want to add extra headers to mail header when there is a mail forward. Precisely, I want to add the e-mail id for which the forward happens. Is there any way to add those details to the e-mail headers. Regards, Shameem
Re: Add extra headers when forwarding
Yes it adds received header. But it doesn't add the user details. Below is the header details. Received: from mx1 (INBOUNDSERVER [IPADDRESS]) by FORWARDSERVER (Postfix) with ESMTP id BA40E4940D6 for ; Thu, 18 Feb 2010 02:19:28 + (GMT) Received: from snt0-omc4-s3.snt0.hotmail.com (snt0-omc4-s3.snt0.hotmail.com [65.55.90.206]) by MX1 SERVER (Postfix) with ESMTP id B0B74618036 for ; Thu, 18 Feb 2010 02:19:27 + (GMT) Received: from SNT111-W21 ([65.55.90.200]) by snt0-omc4-s3.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Feb 2010 18:19:26 -0800 Regards, Shameem --- On Mon, 2/22/10, Wietse Venema wie...@porcupine.org wrote: From: Wietse Venema wie...@porcupine.org Subject: Re: Add extra headers when forwarding To: Shameem Ahamed shameem.aha...@yahoo.com Cc: postfix-us...@cloud9.net Date: Monday, February 22, 2010, 11:42 PM Shameem Ahamed: Currently, when the postfix forwards the mails to the forward server it is not adding any headers for the e-mail for which it forwards. As required by the SMTP protocol, Postfix prepends a Received: message header with the local queue ID, a date stamp, and other trace information. Wietse
Re: Add extra headers when forwarding
Can i add this in main.cf? I want to add the extra details only for the forward maps. Can you give me some more info on ow to add this ?. Regards, Shameem --- On Mon, 2/22/10, Bas Mevissen ab...@basmevissen.nl wrote: From: Bas Mevissen ab...@basmevissen.nl Subject: Re: Add extra headers when forwarding To: Shameem Ahamed shameem.aha...@yahoo.com Cc: postfix-us...@cloud9.net Date: Monday, February 22, 2010, 10:43 PM On Mon, 2010-02-22 at 22:28 +0530, Shameem Ahamed wrote: Hi All, I have one postfix mail server, and a forward server. The mail server accepts all the mails, and forwards mails to the forward server if the mail is a forward. Currently, when the postfix forwards the mails to the forward server it is not adding any headers for the e-mail for which it forwards. I want to add extra headers to mail header when there is a mail forward. Precisely, I want to add the e-mail id for which the forward happens. Is there any way to add those details to the e-mail headers. You could use a procmail rule to add an extra header with formail: :0 fw: | formail -A X-Mail-Tracking: $logn...@$host forwarded Bas.
Re: Add extra headers when forwarding
Ok, i will explain you the scenario. suppose i have an e-mail account, s...@shameem.com, and i have setup e-mail forwarding for this id, to shameem.aha...@yahoo.com. If somebody (sham...@test.com) sends me a mail to s...@shameem.com, it gets delivered to my yahoo id. In this cases, in headers i am able to see sham...@test.com and shamee.aha...@yahoo.com. But the actual e-mail address s...@shameem.com is missing from the headers. Regards, Shameem --- On Mon, 2/22/10, Magnus Bäck mag...@dsek.lth.se wrote: From: Magnus Bäck mag...@dsek.lth.se Subject: Re: Add extra headers when forwarding To: postfix-users@postfix.org Date: Monday, February 22, 2010, 11:37 PM On Monday, February 22, 2010 at 17:58 CET, Shameem Ahamed shameem.aha...@yahoo.com wrote: I have one postfix mail server, and a forward server. The mail server accepts all the mails, and forwards mails to the forward server if the mail is a forward. Currently, when the postfix forwards the mails to the forward server it is not adding any headers for the e-mail for which it forwards. I want to add extra headers to mail header when there is a mail forward. Precisely, I want to add the e-mail id for which the forward happens. What is e-mail id? The Message-Id header is already present, and Postfix always adds its own queue id in a Received header. What problem are you trying to solve? -- Magnus Bäck mag...@dsek.lth.se
Re: Add extra headers when forwarding
I am seeing just ';' in that place. Am i doing anything wrong ?. Shameem --- On Tue, 2/23/10, Wietse Venema wie...@porcupine.org wrote: From: Wietse Venema wie...@porcupine.org Subject: Re: Add extra headers when forwarding To: Postfix users postfix-users@postfix.org Date: Tuesday, February 23, 2010, 12:48 AM Shameem Ahamed: Yes it adds received header. But it doesn't add the user details. Below is the header details. Received: from mx1 (INBOUNDSERVER [IPADDRESS]) by FORWARDSERVER (Postfix) with ESMTP id BA40E4940D6 for RECIPIENT; Thu, 18 Feb 2010 02:19:28 + (GMT) The recipient is HERE. If you don't see the recipient, then you use a BROKEN MAIL READER. Wietse