Limiting smtpd_upstream_proxy_protocol to certain IPs

2020-08-20 Thread Andreas Thienemann
Hi, I had the unfortunate situation the other day, that the network my postfix mailserver is in, was suddenly not reachable from parts of the Internet. Basically Vodafone messed up some internal filters. While they were trying to sort things out, I was having a look to see how I could reduce

policyd, prepend and long lines

2020-07-16 Thread Andreas Thienemann
Hi, I have a greylisting policy daemon running with postfix v3.2.2. This works nicely and when a mail is accepted, the policy daemon adds a header along the lines of "X-greylist: mail greylisted for {duration} on {hostname}." This is done by sending "action=PREPEND header_text". This works n

Re: Trying to understand smtpd_recipient_restrictions order

2019-05-09 Thread Andreas Thienemann
Hi Viktor, On Thu, 9 May 2019, Viktor Dukhovni wrote: On May 9, 2019, at 1:13 PM, Andreas Thienemann wrote: I have the following items in my config: http://www.postfix.org/DEBUG_README.html#mail fair enough... Problem description: smtpd_recipient_restrictions seems to be working

Trying to understand smtpd_recipient_restrictions order

2019-05-09 Thread Andreas Thienemann
Hi, I was under the impression, that smtpd_recipient_restrictions and other restriction configuration items were being processed top to bottom. I am running postfix 3.2.2 and as far as I can see my postfix is showing a different behavior. I have the following items in my config: smtpd_reci

Re: Virtual Mailbox Delivery with mixed address classes.

2019-05-06 Thread Andreas Thienemann
Hi Viktor, On Mon, 6 May 2019, Viktor Dukhovni wrote: In most cases virtual(5) is superior to aliases(5), but you still need it for mailman and pipes, so you'd rewrite those to localhost (or some suitable domain listed in mydestination). Right. Good point. Something to keep in mind. To para

Re: Virtual Mailbox Delivery with mixed address classes.

2019-05-05 Thread Andreas Thienemann
Hi Viktor, On Sun, 5 May 2019, Viktor Dukhovni wrote: On Mon, May 06, 2019 at 02:38:15AM +0200, Andreas Thienemann wrote: I currently have a mailserver that serves as final destination for a domain, say example.com which is configured as mydestination. This works, but I generally prefer to

Virtual Mailbox Delivery with mixed address classes.

2019-05-05 Thread Andreas Thienemann
Hi, I am trying to wrap my head around the different address classes and how to combine that with the virtual mailbox delivery system. I currently have a mailserver that serves as final destination for a domain, say example.com which is configured as mydestination. I have users on that doma

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: I do not know if skipping the printable() call does have any side-effects though. As a short-term fix it is probably OK, because the cleanup daemon already filters the response. But smtpd should not rely on the cleanup server doing that. R

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: Try this: *** ./src/smtpd/smtpd.c-2019-03-30 08:05:29.0 -0400 --- ./src/smtpd/smtpd.c 2019-04-03 08:26:07.0 -0400 *** *** 3598,3604 if (state->err == 0) { why = vstring_alloc(10);

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: I am investigating this in my copious spare time. The channel from cleanup to smtpd was originally designed for single-line responses from header/body_checks. If that is the problem then I'll devise a workaround for existing code, and a proper

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi John, On Wed, 3 Apr 2019, John Fawcett wrote: The output you sent shows what the smtpd server replies to the client and shows a different behaviour between sendmail and postfix when the milter usesĀ  smfi_setmlreply(). It does not show that postfix is receiving multiple reply lines from t

Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-02 Thread Andreas Thienemann
Hi, I have a locally developed milter using the python-milter bindings which seems to trigger a Postfix bug. The milter in question uses the smfi_setmlreply() command to set a multiline response as defined in rfc5321. Multiline replies should result in the smtpd replying with something like

Re: check_recipient_access after rewrite happens

2017-09-21 Thread Andreas Thienemann
Hi, On Wed, 20 Sep 2017, Wietse Venema wrote: > > If you have a virtual alias that rewrites an address to the spam > > sink, specify that address in the SMTP daemon acces rules instead. > [,,,] > That would work. A bit of a hack though and I think it would only work for > virtual aliases

Re: check_recipient_access after rewrite happens

2017-09-19 Thread Andreas Thienemann
Hi, On Tue, 19 Sep 2017, Wietse Venema wrote: > During migration of an inherited mail system I have the situation that I > would like to reject certain recipient address _after_ they have been > rewritten through the virtual_alias_maps. The SMTP daemon acces rules currently do not have acc

check_recipient_access after rewrite happens

2017-09-19 Thread Andreas Thienemann
Hi, During migration of an inherited mail system I have the situation that I would like to reject certain recipient address _after_ they have been rewritten through the virtual_alias_maps. The old system had a spam sink where users could redirect certain local parts. e.g. a user has a catcha

Re: Mixing of address classes per domain

2017-09-18 Thread Andreas Thienemann
Hi Viktor, On Mon, 18 Sep 2017, Viktor Dukhovni wrote: As far as I understand, the virtual_alias_maps will only do rewriting to local or remote addresses but disregard transport entries. No, this is not the case. All that happens with virtual_alias_maps is recursive rewriting of all input re

Mixing of address classes per domain

2017-09-18 Thread Andreas Thienemann
Hi, I have inherited an older postfix and sendmail system with a cyrus imapd. My plan now is to migrate that to a postfix 3.x MTA with a dovecot imap backend. Pretty standard so far. When trying to migrate the existing mail routing logic I did come accross certain rules which are working cor