Re: Procmail Advice

2016-11-26 Thread E. Recio

On 11/22/2016 10:47 AM, @lbutlr wrote:

On Nov 21, 2016, at 9:34 PM, E. Recio  wrote:

So I have a problem in that using egrep and python my regexp works fine. However, when I 
implement this regexp in procmail it does not. I have handled the space-before-backslash 
issue already... but is there another nuance I am not understanding? Is there a way to 
have procmail process an "eml" file or mbox file for testing, or even generic 
regexp testing on standard in?


There is a procmail mailing list. It is not very active.

L i s t-S u b s c r i b e: 
,


Procmail hasn’t seen any development effort in close to 20 years, with the last 
real update back in 1999, IIRC. I would not suggest anyone start on procmail 
now, and I say this as someone who uses procmail.


Thanks for the advice! It's been on all my computers since I started 
using *nix in 1997. I guess I took it for granted as a tool like "grep" 
:) I am using procmail for some simple maillist filtering, and 
spamassassin run for my account only (personal boxes), not a massive 
deployment for end-users. Hopefully it won't be deprecated soon.



Secondly, is there a way for postfix to reject mail from unresolvable domains 
(e.g.: reverse lookup of 1.2.3.4 returns unknown, please reject).


I think that is

 reject_unknown_reverse_client_hostname,

but I also use:
 reject_non_fqdn_recipient,
 reject_unknown_sender_domain,
 reject_invalid_hostname,


Wow, these settings cut down on spam by a lot! My concern is that if 
someone is on a private remote NAT network (sending real) example.com 
(sending real) 1.2.3.4 but the host behind the 1.2.3.4 NAT is (sending 
host) example.local (sending host) 10.1.2.3 and sends email by directly 
connecting to my postfix server via 25, would the email get to me? How 
common is that scenario when most providers are blocking 25 out, and 
require users to use their authenticated relay?


Of course for real hosted solutions or cloud services (servers) I don't 
see this being a problem because the sending server would get resolved.


Thanks in advance.


Re: Mail delivery problems to outlook.com controlled domains

2016-11-26 Thread Ralf Hildebrandt
* Jack Raats :
> Hi everyone,
> 
>  
> 
> Please help me!!!
> 
>  
> 
> Since last tuesday my mailservers cann’t deliver email to an outlook.com 
> controlled domain. Before tuesday everything was ok.
> 
> Accoording to microsoft my postfix server doesn’t comply with the several 
> rfc’s describing how to send email.

Care to share the rejection message?

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG, 80333 München
   
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: noob question on filtering and sending mail to bdd or rest request

2016-11-26 Thread Wietse Venema
St?phane MERLE:
> Hi,
> 
> Hi,
> 
> I found this and it looks just perfect for this !
> 
> http://serverfault.com/questions/322657/how-can-i-route-some-emails-to-a-script-in-postfix
> 
> one more question, if my script die and cannot process the mail (too 
> much cpu or ... script bug), the mail is lost or will go back in queue ? 
> How my script tell postfix that the process is ok or not for postfix to 
> have a clean exit ?

Please see "man 8 pipe". This documentation describes how Postfix
deals with successful or failed exits from a program, and more.

Wietse

> again sorry if those questions are not asked in the good place or form, 
> please advise and I will try my best !
> 
> St?phane
> 
> 
> 
> 
> Le 25/11/2016 ? 11:35, St?phane MERLE a ?crit :
> > Hi,
> >
> > I got a 2 dedicated postfix/dovecot servers that deal with return to 
> > replyto mails. For now, I got a bash script that "read and parse" each 
> > files in /Maildir/new and if it match some criterias (most on 
> > TO/FROM/SUBJECT) send it to another domain mailbox, from that new 
> > domain, the mails are taken and inserted in a MSSQL bdd by a script 
> > that pop the box ...
> >
> > That way of working seems not efficient to me, so I am trying to find 
> > a way to parse the mail directly within postfix (I think that sieve 
> > can handle that), and to insert it into the bdd or make a HTTP REST 
> > call to our API ...
> >
> > First is that just possible (sending the mail to a bdd or to a POST 
> > HTTP call) ?
> >
> > and if not, where can I find information on how I can use postfix to 
> > send each mail to a developed a golang binary that would parse the 
> > mail and call the API (kind of like it seems to work with dovecot or 
> > sieve or spamassassin). In order to know what to answer to postfix for 
> > example ... or a way to tell sieve to send the mail matching those 
> > criterias to my process
> >
> > Sorry if the question sounds terrible, and maybee offtopic, I am 
> > trying to find a better way to deal with that task.
> >
> > St?phane
> >
> >
> >
> 
> 
> 
> 


Re: noob question on filtering and sending mail to bdd or rest request

2016-11-26 Thread Stéphane MERLE

Hi,

Hi,

I found this and it looks just perfect for this !

http://serverfault.com/questions/322657/how-can-i-route-some-emails-to-a-script-in-postfix

one more question, if my script die and cannot process the mail (too 
much cpu or ... script bug), the mail is lost or will go back in queue ? 
How my script tell postfix that the process is ok or not for postfix to 
have a clean exit ?


again sorry if those questions are not asked in the good place or form, 
please advise and I will try my best !


Stéphane




Le 25/11/2016 à 11:35, Stéphane MERLE a écrit :

Hi,

I got a 2 dedicated postfix/dovecot servers that deal with return to 
replyto mails. For now, I got a bash script that "read and parse" each 
files in /Maildir/new and if it match some criterias (most on 
TO/FROM/SUBJECT) send it to another domain mailbox, from that new 
domain, the mails are taken and inserted in a MSSQL bdd by a script 
that pop the box ...


That way of working seems not efficient to me, so I am trying to find 
a way to parse the mail directly within postfix (I think that sieve 
can handle that), and to insert it into the bdd or make a HTTP REST 
call to our API ...


First is that just possible (sending the mail to a bdd or to a POST 
HTTP call) ?


and if not, where can I find information on how I can use postfix to 
send each mail to a developed a golang binary that would parse the 
mail and call the API (kind of like it seems to work with dovecot or 
sieve or spamassassin). In order to know what to answer to postfix for 
example ... or a way to tell sieve to send the mail matching those 
criterias to my process


Sorry if the question sounds terrible, and maybee offtopic, I am 
trying to find a better way to deal with that task.


Stéphane









Re: Mail delivery problems to outlook.com controlled domains

2016-11-26 Thread Viktor Dukhovni

> On Nov 26, 2016, at 4:04 AM, Syed Alam  wrote:
> 
> It might be related to 'missing' Fromheader. Can you also copy the bounce 
> error message here from your postfix logs?

There's no reason to make stuff up.  Best to wait for the missing
details.

> You can also test your mail headers by sending email to emailaudit.com seed 
> address (free tool that we made)

There are likely many other ways to waste the OP's time...

-- 
Viktor.



Re: Mail delivery problems to outlook.com controlled domains

2016-11-26 Thread Syed Alam
It might be related to 'missing' Fromheader. Can you also copy the bounce
error message here from your postfix logs?

You can also test your mail headers by sending email to emailaudit.com seed
address (free tool that we made)

Thanks,
Syed

On Fri, Nov 25, 2016 at 8:37 PM, Viktor Dukhovni  wrote:

>
> > On Nov 25, 2016, at 1:49 PM, Jack Raats  wrote:
> >
> > Since last tuesday my mailservers cann’t deliver email to an outlook.com
> controlled domain. Before tuesday everything was ok.
>
> This would be a good time to take stock of any changes you made at that
> time.
>
> > Accoording to microsoft my postfix server doesn’t comply with the
> several rfc’s describing how to send email.
>
> Often the folks on level-1 support can barely add 1+1 without looking
> up the answer in their canned list of responses.  There is little reason
> to take what they say too seriously.
>
> In the mean-time:
>
>http://www.postfix.org/DEBUG_README.html#mail
>http://www.postfix.org/DEBUG_README.html#logging
>
> LOGS = HELP
> NO LOGS = NO HELP
>
> --
> Viktor.
>
>


-- 
Syed Alam


Postmastery
Amsterdam, NL
Skype: alam50
T: +31 20 261 0438