Re: Deferred mail and transports and retries

2013-07-26 Thread Abhijeet Rastogi
Hi Wietse,

This helps. Half reading is always bad. This clears everything about my
doubt.

One other thing still remains. I've multiple smtp services defined like
this. (in master.cf, to use different IPs, selected randomly)

ob-smtp1   unix-   -   n   -   - smtp
  -o smtp_bind_address=1.2.3.4
  -o syslog_name=postfix-smtp1
ob-smtp2   unix-   -   n   -   - smtp
  -o smtp_bind_address=5.6.7.8
  -o syslog_name=postfix-smtp2

I suppose that if a message delivered via one of the transport and
deferred, it'll always be tried via the same smtp service. Is there a
possibility where I can change the smtp service while retrying for a
already deferred mail?

On Thu, Jul 25, 2013 at 6:06 PM, Wietse Venema wie...@porcupine.org wrote:

 Abhijeet Rastogi:
  Hi Wietse,
 
  Thanks for you reply. I may be wrong but I just know what I read in
  http://tools.ietf.org/html/rfc5321#section-4.5.4
 
The sender MUST delay retrying a particular destination after one
attempt has failed.  In general, the retry interval SHOULD be at

 According to RFC 5321 section 5.1, the sending host should try at
 least two delivery addresses.

 Quote:

When the lookup succeeds, the mapping can result in a list of
alternative delivery addresses rather than a single address,
because of multiple MX records, multihoming, or both.  To provide
reliable mail transmission, the SMTP client MUST be able to try
(and retry) each of the relevant addresses in this list in order,
until a delivery attempt succeeds.  However, there MAY also be
a configurable limit on the number of alternate addresses that
can be tried.  In any case, the SMTP client SHOULD try at least
two addresses.

 If you believe that Postfix should wait between the attempts to
 connect to the first and the second MX address, then you are in
 error.

 Wietse




-- 
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com


Re: Deferred mail and transports and retries

2013-07-26 Thread Wietse Venema
Abhijeet Rastogi:
 Hi Wietse,
 
 This helps. Half reading is always bad. This clears everything about my
 doubt.
 
 One other thing still remains. I've multiple smtp services defined like
 this. (in master.cf, to use different IPs, selected randomly)
 
 ob-smtp1   unix-   -   n   -   - smtp
   -o smtp_bind_address=1.2.3.4
   -o syslog_name=postfix-smtp1
 ob-smtp2   unix-   -   n   -   - smtp
   -o smtp_bind_address=5.6.7.8
   -o syslog_name=postfix-smtp2
 
 I suppose that if a message delivered via one of the transport and
 deferred, it'll always be tried via the same smtp service. Is there a
 possibility where I can change the smtp service while retrying for a
 already deferred mail?

You can specify an alternate MTA (with smtp_fallback_relay) for
delayed mail.  There is no feature to specify an alternate delivery
agent for delayed mail.

The example looks like an attempt to circumvent Yahoo etc. rate
limits per client IP address.  I don't have to make that easy
with Postfix.

Wietse


Re: Deferred mail and transports and retries

2013-07-26 Thread Abhijeet Rastogi
You can specify an alternate MTA (with smtp_fallback_relay) for

 delayed mail.  There is no feature to specify an alternate delivery
 agent for delayed mail.


Hmm, I was aware of that thing.  I've not used this feature but it's
definitely worth trying.

The example looks like an attempt to circumvent Yahoo etc. rate
 limits per client IP address.  I don't have to make that easy
 with Postfix.


It's not about me trying to do spam. I'm part of a hosting company and
sometimes our IPs get blocked temporarily when our outbound spam system
stops performing for some odd reason.

Thanks for the help.



 Wietse




-- 
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com


Re: Deferred mail and transports and retries

2013-07-25 Thread Michael P. Demelbauer
On Thu, Jul 25, 2013 at 12:16:15PM +0530, Abhijeet Rastogi wrote:
 Hi all,
 
 1. If a mail is temporarily deferred from a remote MTA, postfix should
 back-off instantly for some time but I observed this today.
 
 Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
 mta6.am0.yahoodns.net[98.138.112.35] refused to talk to me: 421 4.7.0
 [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
 to http://postmaster.yahoo.com/errors/postmaster-21.html
 Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
 mta6.am0.yahoodns.net[63.250.192.46] refused to talk to me: 421 4.7.0
 [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
 to http://postmaster.yahoo.com/errors/postmaster-21.html
 
 Can anyone explain why would this happen?

It's kind of explained in
http://postmaster.yahoo.com/errors/postmaster-21.html (and Links from
there)

You get this, because there were complaints of Yahoo!-Users, that they
don't want some of the mails your mailserver sends.

Michael
 
 2. I've multiple transports defined in master.cf which bind to different
 IPs. When a mail is deferred, will it always be tried via the same
 transport? If yes, is there a way I can change this behaviour?
 
 
 -- 
 Regards,
 Abhijeet Rastogi (shadyabhi)
 http://blog.abhijeetr.com

-- 
Michael P. Demelbauer
Systemadministration
WSR
Arsenal, Objekt 20
1030 Wien
---
To learn something new, take the path that you took yesterday. 
--John Burroughs


Re: Deferred mail and transports and retries

2013-07-25 Thread Abhijeet Rastogi
Hi Micheal,

Thanks for your reply. Actually, the issue was I was just writing the mail
and it got Sent by mistake. (But, then reading the mail I thought that the
message was conveyed.)

The issue is, why does postfix retry the second time instantly (within 1
sec)? Shouldn't postfix wait till the next deferred queue scan happens?
(I'm talking about backoff time etc). It tries the delivery 2 times within
1 sec. My understanding says that it should wait till the minimum backoff
time.

On Thu, Jul 25, 2013 at 1:01 PM, Michael P. Demelbauer 
michael.demelba...@wsr.ac.at wrote:

 On Thu, Jul 25, 2013 at 12:16:15PM +0530, Abhijeet Rastogi wrote:
  Hi all,
 
  1. If a mail is temporarily deferred from a remote MTA, postfix should
  back-off instantly for some time but I observed this today.
 
  Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
  mta6.am0.yahoodns.net[98.138.112.35] refused to talk to me: 421 4.7.0
  [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please
 refer
  to http://postmaster.yahoo.com/errors/postmaster-21.html
  Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
  mta6.am0.yahoodns.net[63.250.192.46] refused to talk to me: 421 4.7.0
  [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please
 refer
  to http://postmaster.yahoo.com/errors/postmaster-21.html
 
  Can anyone explain why would this happen?

 It's kind of explained in
 http://postmaster.yahoo.com/errors/postmaster-21.html (and Links from
 there)

 You get this, because there were complaints of Yahoo!-Users, that they
 don't want some of the mails your mailserver sends.

 Michael
 
  2. I've multiple transports defined in master.cf which bind to different
  IPs. When a mail is deferred, will it always be tried via the same
  transport? If yes, is there a way I can change this behaviour?
 
 
  --
  Regards,
  Abhijeet Rastogi (shadyabhi)
  http://blog.abhijeetr.com

 --
 Michael P. Demelbauer
 Systemadministration
 WSR
 Arsenal, Objekt 20
 1030 Wien

 ---
 To learn something new, take the path that you took yesterday.
 --John Burroughs




-- 
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com


Re: Deferred mail and transports and retries

2013-07-25 Thread Wietse Venema
Abhijeet Rastogi:
 The issue is, why does postfix retry the second time instantly (within 1
 sec)? Shouldn't postfix wait till the next deferred queue scan happens?

No, this is not required. If you disagree, please point out in 
the SMTP standard, RTFM RFC 5321, where Postfix is in error.

Wietse


Re: Deferred mail and transports and retries

2013-07-25 Thread Abhijeet Rastogi
Hi Wietse,

Thanks for you reply. I may be wrong but I just know what I read in
http://tools.ietf.org/html/rfc5321#section-4.5.4

  The sender MUST delay retrying a particular destination after one
  attempt has failed.  In general, the retry interval SHOULD be at
   least 30 minutes; however, more sophisticated and variable strategies
   will be beneficial when the SMTP client can determine the reason for
   non-delivery.

Can you help me understand as to where I'm wrong? It says that after one
attempt is made, it should delay the next retry.
Is it like, all MXs (ip addresses) are tried in one go before actually
deferring a mail?

Thanks in advance.

On Thu, Jul 25, 2013 at 3:54 PM, Wietse Venema wie...@porcupine.org wrote:

 Abhijeet Rastogi:
  The issue is, why does postfix retry the second time instantly (within 1
  sec)? Shouldn't postfix wait till the next deferred queue scan happens?

 No, this is not required. If you disagree, please point out in
 the SMTP standard, RTFM RFC 5321, where Postfix is in error.

 Wietse




-- 
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com


Re: Deferred mail and transports and retries

2013-07-25 Thread Wietse Venema
Abhijeet Rastogi:
 Hi Wietse,
 
 Thanks for you reply. I may be wrong but I just know what I read in
 http://tools.ietf.org/html/rfc5321#section-4.5.4
 
   The sender MUST delay retrying a particular destination after one
   attempt has failed.  In general, the retry interval SHOULD be at

According to RFC 5321 section 5.1, the sending host should try at
least two delivery addresses.

Quote:

   When the lookup succeeds, the mapping can result in a list of
   alternative delivery addresses rather than a single address,
   because of multiple MX records, multihoming, or both.  To provide
   reliable mail transmission, the SMTP client MUST be able to try
   (and retry) each of the relevant addresses in this list in order,
   until a delivery attempt succeeds.  However, there MAY also be
   a configurable limit on the number of alternate addresses that
   can be tried.  In any case, the SMTP client SHOULD try at least
   two addresses.

If you believe that Postfix should wait between the attempts to
connect to the first and the second MX address, then you are in
error.

Wietse


Re: Deferred mail and transports and retries

2013-07-25 Thread Peer Heinlein
Am 25.07.2013 09:52, schrieb Abhijeet Rastogi:


 The issue is, why does postfix retry the second time instantly (within 1
 sec)? Shouldn't postfix wait till the next deferred queue scan happens?

Because that's best Postfix can do. Because Postfix SHOULD do that:

*) Because if on MX is down, the second one could/should be up and
running, so why shouldn't Postfix use it
*) Because Postfix isn't interested in wasting resources and storing
deliverable e-mails in the deferred queue
*) Because the sender wants to have delivered his e-mail fast without
unnecessary delays
*) Because the recupient wants to receive his e-mails quickly without
unnecessary delays

If you believe that deferring e-mails and wasting time is helpful, then use

smtp_mx_address_limit = 1
smtp_mx_session_limit = 1

but don't complain about delays.


Peer



-- 
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-42
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin


Re: Deferred mail

2013-01-20 Thread Muzaffer
On 18 January 2013 21:14, Muzaffer to...@ozses.net wrote:



 On 17 January 2013 08:55, Timo Röhling timo.roehl...@gmx.de wrote:

 Am 17.01.2013 06:20, schrieb Muzaffer:
  Jan 17 06:14:20 ommuse postfix/smtp[25504]: BC05AF629A:
  to=sertacona...@gmail.com mailto:sertacona...@gmail.com,
 relay=none,
  delay=116212, delays=116107/0.02/105/0, dsn=4.4.1, status=deferred
  (connect to alt4.gmail-smtp-in.l.google.com
  http://alt4.gmail-smtp-in.l.google.com[74.125.141.26]:25: Connection
  timed out)
 The message indicates that your system is unable to connect to the
 Google servers, suggesting a network problem or a system overload.

  As you can see from the logs, I get deferred. What does it even mean and
  how can I fix it?
 Deferred means that Postfix encountered a non-fatal error condition and
 resolves this by waiting some time before trying again. Mostly, this is
 harmless and Postfix does the right thing by default. You may have a
 problem if Postfix gives up eventually.

 Hi,

 To debug, I've taken these steps:

 1- I did telnet 74.125.141.26 25, and I got a reply. I think that
 eliminates the connection fault.
 2- I did telnet mail.ommuse.com 25 (my own server), and sent outside
 world an e-mail. Then I got the above error again.
 3- Using mutt, I sent outside world an e-mail. Again, I got the above
 error.

 How can I further troubleshoot?

 Here's my postconf -n:

 alias_database = hash:/etc/aliases
 alias_maps = hash:/etc/aliases
 allow_percent_hack = no
 append_dot_mydomain = no
 biff = no
 broken_sasl_auth_clients = yes
 config_directory = /etc/postfix
 home_mailbox = Maildir/
 mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
 mailbox_size_limit = 0
 mydestination = localhost.$mydomain, localhost, $mydomain, ommuse.com
 myhostname = ommuse.com
 mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128, 5.9.235.23/32
 myorigin = /etc/mailname
 readme_directory = no
 recipient_delimiter = +
 relay_domains = $mydomain
 sender_bcc_maps = hash:/etc/postfix/bcc
 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
 smtpd_recipient_restrictions = permit_sasl_authenticated,
  permit_mynetworks,reject_unauth_destination,
  reject_non_fqdn_hostname,reject_non_fqdn_sender,
  reject_non_fqdn_recipient,reject_unauth_pipelining,
  reject_invalid_hostname,reject_rbl_client sbl.spamhaus.org,
  reject_rbl_client xbl.spamhaus.org
 smtpd_sasl_auth_enable = yes
 smtpd_sasl_authenticated_header = yes
 smtpd_sasl_local_domain = $myhostname
 smtpd_sasl_path = private/auth
 smtpd_sasl_security_options = noanonymous
 smtpd_sasl_type = dovecot
 smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
 smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
 smtpd_use_tls = yes
 virtual_alias_domains = $virtual_alias_maps
 virtual_alias_maps = hash:/etc/postfix/virtual

 Regards,


Thanks to several people on Freenode #postfix, I solved this issue. The
problem was iptables blocking outbound mail.

Regards,


Re: Deferred mail

2013-01-18 Thread Muzaffer
On 17 January 2013 08:55, Timo Röhling timo.roehl...@gmx.de wrote:

 Am 17.01.2013 06:20, schrieb Muzaffer:
  Jan 17 06:14:20 ommuse postfix/smtp[25504]: BC05AF629A:
  to=sertacona...@gmail.com mailto:sertacona...@gmail.com, relay=none,
  delay=116212, delays=116107/0.02/105/0, dsn=4.4.1, status=deferred
  (connect to alt4.gmail-smtp-in.l.google.com
  http://alt4.gmail-smtp-in.l.google.com[74.125.141.26]:25: Connection
  timed out)
 The message indicates that your system is unable to connect to the
 Google servers, suggesting a network problem or a system overload.

  As you can see from the logs, I get deferred. What does it even mean and
  how can I fix it?
 Deferred means that Postfix encountered a non-fatal error condition and
 resolves this by waiting some time before trying again. Mostly, this is
 harmless and Postfix does the right thing by default. You may have a
 problem if Postfix gives up eventually.

 Hi,

To debug, I've taken these steps:

1- I did telnet 74.125.141.26 25, and I got a reply. I think that
eliminates the connection fault.
2- I did telnet mail.ommuse.com 25 (my own server), and sent outside world
an e-mail. Then I got the above error again.
3- Using mutt, I sent outside world an e-mail. Again, I got the above error.

How can I further troubleshoot?

Here's my postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = localhost.$mydomain, localhost, $mydomain, ommuse.com
myhostname = ommuse.com
mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128, 5.9.235.23/32
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = $mydomain
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,
 permit_mynetworks,reject_unauth_destination,
 reject_non_fqdn_hostname,reject_non_fqdn_sender,
 reject_non_fqdn_recipient,reject_unauth_pipelining,
 reject_invalid_hostname,reject_rbl_client sbl.spamhaus.org,
 reject_rbl_client xbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual

Regards,


Re: Deferred mail

2013-01-17 Thread Wietse Venema
Muzaffer:
 Hi,
 
 I fear I might have misconfigured. Here's my logs:
 
 Jan 17 06:14:20 ommuse postfix/smtp[25504]: BC05AF629A: to=
 x...@gmail.com, relay=none, delay=116212,
 delays=116107/0.02/105/0, dsn=4.4.1, status=deferred (connect to
 alt4.gmail-smtp-in.l.google.com[74.125.141.26]:25: Connection timed out)

Another possibility is that your ISP does not allow its customers
to make connections to port 25, as an anti-spam countermeasure.

If this is your relayhost, try relayhost = [smtp.gmail.com]:587.

Wietse


Re: deferred mail

2010-07-15 Thread Victor Duchovni
On Thu, Jul 15, 2010 at 02:42:17PM -0700, motty.cruz wrote:

 Hello, 
 I'm using two instances of postfix and lately I've been getting a lot of
 deferred email, any suggestions how to stop accepting email that can't be
 delivered. I do have local recipients table, server should not accept email
 that can't be deliver. Please help!
 
 host# perl check_outmail
 -Queue ID- --Size-- Arrival Time -Sender/Recipient---
 CC858A1091 4664 Thu Jul 15 12:58:42  MAILER-DAEMON
 (connect to forum.ituin.org[69.43.160.175]:25: Connection
 refused)
  mavn...@forum.ituin.org
 
 49735A109F 4663 Thu Jul 15 13:16:52  MAILER-DAEMON
 (host offworldventures.com[216.97.232.215] said: 451 Temporary local problem
 - please try later (in reply to RCPT TO command))
  adow...@offworldventures.com
 
 -- 10 Kbytes in 2 Requests.

Two deferred bounces is a lot??? You need to read the bounce messages
(use postcat -q) to see what undeliverable mail failed, how it got
to you and where it was found undeliverable).

 
 local_recipient_maps = hash:/usr/local/etc/postfix/userdb,
 hash:/usr/local/etc/postfix/uservirt

This covers local(8) recipients for domains listed in $mydestination.

 mydestination =  example.com, example2.com, example3.com
 relay_domains = hash:/usr/local/etc/postfix/relay_domains

You also have relay_domains, but no relay_recipient_maps, so you
are accepting bouncing invalid recipients in these domains.

-- 
Viktor.


Re: deferred mail -retry

2009-06-09 Thread Ralf Hildebrandt
* K bharathan kbhara...@gmail.com:
 hi all
 what's the default deferred mail retry time in postfix?

retry time for what?

-- 
Ralf Hildebrandt
Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
http://www.computerbeschimpfung.de
Standard Cyrus SASL behaviour. SASL developers don't believe in
logging.  Logging is for wimps, real men use their psychic abilities
to find out what's going on.-- Liviu Daia


Re: deferred mail -retry

2009-06-09 Thread K bharathan
retrying time for attempting deliver the message

On Tue, Jun 9, 2009 at 1:16 PM, Ralf Hildebrandt 
ralf.hildebra...@charite.de wrote:

 * K bharathan kbhara...@gmail.com:
  hi all
  what's the default deferred mail retry time in postfix?

 retry time for what?

 --
 Ralf Hildebrandt
 Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
 http://www.computerbeschimpfung.de
 Standard Cyrus SASL behaviour. SASL developers don't believe in
 logging.  Logging is for wimps, real men use their psychic abilities
 to find out what's going on.-- Liviu Daia



Re: deferred mail -retry

2009-06-09 Thread K bharathan
thanks

On Tue, Jun 9, 2009 at 2:24 PM, Ralf Hildebrandt 
ralf.hildebra...@charite.de wrote:

 * K bharathan kbhara...@gmail.com:
  retrying time for attempting deliver the message

 I assume you're thinking of non-local delivery

 queue_run_delay = 300s
 maximal_backoff_time = 4000s
 minimal_backoff_time = 300s

 The queue is scanned every 300s, initial minimal backoff is 300s,
 maximum backoff is 4000s, with every unsuccessful retry the timespan
 between to attempts is increased.

 --
 Ralf Hildebrandt
 Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
 http://www.computerbeschimpfung.de
 Windows is the answer, but only if the question was 'what is the
 intellectual equivalent of being a galley slave?'