Postfix - smtpd_upstream_proxy_protocol and smtpd_proxy_filter

2013-08-08 Thread osax
Hi all,

Is it possible to use both smtpd_proxy_filter and
smtpd_upstream_proxy_protocol simultaneously?

I am using haproxy in front of postfix with smtpd_upstream_proxy_protocol =
haproxy
I would also like to send all mail through the smtpd_proxy_filter for
tracking purposes.

Is the above possible seeing that the Proxy header gets sent through first
before I get a 220 code?



--
View this message in context: 
http://postfix.1071664.n5.nabble.com/Postfix-smtpd-upstream-proxy-protocol-and-smtpd-proxy-filter-tp60221.html
Sent from the Postfix Users mailing list archive at Nabble.com.


Re: Postfix - smtpd_upstream_proxy_protocol and smtpd_proxy_filter

2013-08-08 Thread Wietse Venema
osax:
 Hi all,
 
 Is it possible to use both smtpd_proxy_filter and
 smtpd_upstream_proxy_protocol simultaneously?

Yes.
Wietse


SASL:Connect to private/auth failed: Connection refused -- throttling

2013-08-08 Thread V.Dimitrov
Hi List.

Is there a way to ensure that submission listener will not accept connections 
when dovecot is not running?

If not, is it possible to be implemented like for example
smtp/submission inet n   -   -   -   -   smtpd
-o smtpd_sasl_security_options = strict_sasl_path

The goal I want to achieve is to be able to benefit from load-balancer in such 
case.
I appreciate any advise helping me to achieve this.


postfix/smtpd[18998]: connect from client
postfix/smtpd[18998]: warning: SASL: Connect to private/auth failed: Connection 
refused
postfix/smtpd[18998]: fatal: no SASL authentication mechanisms
postfix/master[18533]: warning: process /usr/lib/postfix/smtpd pid 18998 exit 
status 1
postfix/master[18533]: warning: /usr/lib/postfix/smtpd: bad command startup - 
throttling

client # telnet 10.10.10.10 25
Trying 10.10.10.10...
Connected to 10.10.10.10.
Escape character is '^]'.
ehlo testing
Connection closed by foreign host.
client #

Best Regards
Vladislav Dimitrov



Re: SASL:Connect to private/auth failed: Connection refused -- throttling

2013-08-08 Thread Wietse Venema
v.dimit...@synergetic.ag:
 Hi List.
 
 Is there a way to ensure that submission listener will not accept
 connections when dovecot is not running?

No. There are alomst a bazilln possible errors that Postfix may run into,
and there is no feature to detect them before handling an SMTP  connection.

However, YOU can ping the dovecot server and update the LB, or tell
Postfix to turn off the SMTP port (postconf
master_service_disable=smtp.inet or somesuch).

Wietse


Re: SASL:Connect to private/auth failed: Connection refused -- throttling

2013-08-08 Thread Jeroen Geilman

On 08/08/2013 05:10 PM, v.dimit...@synergetic.ag wrote:


Hi List.

Is there a way to ensure that submission listener will not accept 
connections when dovecot is not running?




Dovecot is pretty much as stable as postfix itself.
The real question, therefore, is: why is dovecot not running ?
For HA - or any kind of volume, really - you should be using LMTP to 
dovecot, so you can trivially loadbalance multiple dovecot backends, 
thus preventing dovecot from not running.


--
J.



local(8) file size misunderstanding

2013-08-08 Thread Vincent McIntyre
Hi

I'd like to report an issue I observed today for any comments people
may have.

Obviously this system is going to be upgraded to a recent version
(of OS and postfix), but I wanted to raise the issue for comment
here in case this is unexpected behaviour. I can't find reference
to it in the list archives.

platform: Debian Linux (lenny), linux kernel  2.6.26-2-amd64
postfix: 2.5.5-1.1+lenny
postconf -n:
config_directory = /etc/postfix
html_directory = /usr/share/doc/postfix/html
mailbox_size_limit = 512000   #5-ish Gb
message_size_limit = 5120 #50Mb
mydestination = let me know if this is needed
myhostname = let me know if this is needed
mynetworks = ip of host, 127.0.0.0/8, [:::127.0.0.0]/104, [::1]/128
myorigin = atnf.csiro.au
readme_directory = /usr/share/doc/postfix
relayhost = [mailhost.atnf.csiro.au]
sample_directory = /usr/share/doc/postfix-doc/examples
transport_maps = hash:/etc/postfix/maps/transport

What we saw in syslog was complaints from local(8)

Aug  8 14:22:17 ursa postfix/local[24324]: A88FA35028: 
to=hapl...@mailserver.atnf.csiro.au, relay=local, delay=0.71, 
delays=0.59/0/0/0.13, dsn=5.2.2, status=bounced (cannot update mailbox 
/var/mail/hapless for user hapless. error writing message: File too large)

A new message appeared for each new message delivery attempt.

But the mailbox file size was 787Mb, well under the limit of 5Gb.
This was measured with 'ls', 'du' and 'wc'.
Bounce messages stating the user's mailbox was full were received by
people trying to send messages to the user.
Despite these messages, it seems mail continued to be added to the file,
until about 14 hours later, when I intervened.

The filesystem was far from full. It's ext3, on an LVM logical volume.
There are no quotas set on the filesystem.

lsattr on the file showed no attributes set.
I tried checking for other users of the file, but invoked lsof incorrectly.

Things we tried:
 * reload postfix
 * restart postfix
 * set virtual_mailbox_limit = 512000 (was not set before)
   and reload postfix
 * rename mailbox and let postfix create a new one.
   This last attempt worked.

I checked the ulimits for the user and 'postfix', both were the same.

core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 137216
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) unlimited
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited

It seems like local(8) was getting the file size wrong.
Not clear to me how that is possible.

Kind regards
Vince