How to log output from whatever pipe runs ?

2016-03-31 Thread chaouche yacine
The setup : postfix + maildrop in a virtual user setup. Maildirs are in /var/vmail/domain{1,2,...}/user{1,2,...} When maildrop is invoked from the command line, it delievers the mail correctly. But when it is invoked by postfix, the mail is delivered to the wrong place (/var/vmail/Maildir inst

Re: How to log output from whatever pipe runs ?

2016-03-31 Thread chaouche yacine
On Thursday, March 31, 2016 3:55 PM, Bennett Todd wrote: >How about running a logging wrapper script, instead. Good idea. When maildrop is invoked from the command line, it works. Each mail is delivered to the correct Maildir. Here's what it outputs : root@messagerie[10.10.10.20] ~ # echo "en

Re: How to log output from whatever pipe runs ?

2016-04-06 Thread chaouche yacine
On Thursday, March 31, 2016 5:11 PM, Wietse Venema wrote: > Have to tried to run it by hand as user > VMAIL, just like you configured in master.cf? > >Wietse Yes, in fact, I have run it in 4 different ways. When I run maildropwrapper from the command line mail is delivered to the right Mai

Re: How to log output from whatever pipe runs ?

2016-04-06 Thread chaouche yacine
On Wednesday, April 6, 2016 3:24 PM, Wietse Venema wrote: >Try disabling SeLinux/AppArmor/etc. security. > > > Wietse Thanks Wietse. They don't seem to be installed though. sestatus is not available root@messagerie[10.10.10.20] /etc/apparmor.d # sestatus -bash: sestatus: command not found

Re: How to log output from whatever pipe runs ?

2016-04-06 Thread chaouche yacine
On Wednesday, April 6, 2016 4:42 PM, Viktor Dukhovni wrote: >On Wed, Apr 06, 2016 at 01:38:46PM +0000, chaouche yacine wrote: > >> maildrop  unix  -  n  n  -  -  pipe >> flags=DRhu user=vmail argv=/var/vmail/maildropwrapper -V9 -d ${recipien

Re: How to log output from whatever pipe runs ?

2016-04-06 Thread chaouche yacine
, 2016 5:32 PM, chaouche yacine wrote: On Wednesday, April 6, 2016 4:42 PM, Viktor Dukhovni wrote: >On Wed, Apr 06, 2016 at 01:38:46PM +0000, chaouche yacine wrote: > >> maildrop  unix  -  n  n  -  -  pipe >> flags=DRhu user=vmail argv=/var/vmail/mail

Re: How to log output from whatever pipe runs ?

2016-04-07 Thread chaouche yacine
On Wednesday, April 6, 2016 8:33 PM, Wietse Venema wrote: >Next, have a look at the permissions of the saslauthd socket AND >of its parent directories. Are the directories mode 755, is the >socket mode 644? If it is group-restricted then that may not work. I thought maildrop relied on it's own

Re: Having Postfix relay and deliver locally for one domain?

2016-04-07 Thread chaouche yacine
I'm no postfix expert, but I'm thinking out loud if this can be done by specifying an alias for those emails ? the alias would redirect the mail to another domain and get it delivered through the transport map for that domain. On Thursday, April 7, 2016 7:23 PM, Juerg Reimann wrote: So

Re: SSL3 alert read:fatal:unknown CA

2016-09-05 Thread chaouche yacine
The certificat authority that issued your client's certificate is unknown to postfix.   - Add the CA to /var/spool/postfix/etc/ssl/certs/  - Add to the global /var/spool/postfix/etc/ssl/certs/ca-certificates.crt file Add these two lines to your main.cf smtp_tls_CApath = /etc/ssl/certs/smtp_tls

Re: SSL3 alert read:fatal:unknown CA

2016-09-06 Thread chaouche yacine
- Original Message - From: rei To: postfix-users@postfix.org Sent: Tuesday, September 6, 2016 10:30 AM Subject: Re: SSL3 alert read:fatal:unknown CA >Sep 4 14:29:00 centos-512mb-nyc3-01 postfix/smtpd[6605]: >connect from xxx.com[159.203.103.xxx] 1) smtpd 2) connect from This is

Re: postfix pdf

2017-01-05 Thread chaouche yacine
Are you sending the PDF via a common MUA or via a program/script ? On Thursday, January 5, 2017 4:30 PM, linux-service wrote: I want to receive a mail with pdf attached but got errors: Jan  5 15:44:40 mail postfix/cleanup[21419]: 3AF94CC3CDC: message-id=<809c0b3357a556a826cd508693b0f.

Re: SASL LOGIN authentication failed: no mechanism available

2017-02-09 Thread chaouche yacine
Hi Nick, I'm curious to know what's inside your /etc/postfix/sasl/smtpd.conf file ?

Re: Dovecot,seive and postfix master.cf

2017-02-23 Thread chaouche yacine
If this helps, here's my config : in main.cf : virtual_transport = lmtp:unix:private/dovecot-lmtp I didn't touch anything in master.cf (I let the default lmtp as Ian mentionned). master.cf : lmtp unix - - - - - lmtp in dovecot's 10-master.cf : #

Re: postfix/amavis not scanning email

2017-02-26 Thread chaouche yacine
You have uncommented the bypass instructions in amavis conf file, so it will bypass the scan. Keep them commented and amavis will scan. To test that amavis works well : https://gist.github.com/ychaouche/9b32bda037afb9eaaa2f4809dcfb2ec0 (can't paste the content here otherwise this e-mail will b

Re: postfix/amavis not scanning email

2017-02-26 Thread chaouche yacine
I have been fooled too. See this link : http://shisaa.jp/postset/mailserver-3.html it says there : "Lets first check to see if anti-virus and spam filtering are enabled. Check if the two lines that start with @bypass_spam_checks and @bypass_virus_checks are commented out. If you uncomment the

Re: postfix/amavis not scanning email

2017-02-26 Thread chaouche yacine
I see you did not post your /etc/amavis/conf.d/15-av_scanners file, you need to uncomment clamav there otherwise no scanner will run for you I guess. It should look something like this : ['ClamAV-clamd', \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], qr/\bOK$/, qr/\bFOUND$/

Re: postfix/amavis not scanning email

2017-02-26 Thread chaouche yacine
This is my guess : When a mail arrives at the postfix queue, it is picked up by the pickup process. You have configured pickup to use dkimsign on port 10026 as a content filter (in masster.cf). port 10026 is the configured port for dkimproxy_in, which forwards to 10029. postfix listens on por

Re: postfix/amavis not scanning email

2017-02-27 Thread chaouche yacine
> 1) On the Lenny server, the main.cf content_filter sent mail to 10028, the > relay port for dkim_proxy_out, and this system worked! I might be able to > accept sending to the listening port, but the relay port just doesn't make > sense to me. Unless you have the old config and log files, we can

Re: ot: troubleshhoting MX issue (?)

2017-03-02 Thread chaouche yacine
As long as you're getting a SERVAIL you are having a problem with your resolver. This assumption can be verified if you check with public resolvers like 8.8.8.8 and 8.8.4.4 (dig -t mx surfacetreatment.be @8.8.8.8) -- Yassine. On Thursday, March 2, 2017 5:56 AM, Voytek wrote: On Wed, M

Client is always localhost

2017-03-02 Thread chaouche yacine
o/ I was doing some log processing today for a supposedly sent mail I didn't recieve. It turns out that while I was playing with the log file I suddenly realized that every connection is made from localhost... root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL # zgrep client= /var/log/mail.* |

Re: Client is always localhost

2017-03-06 Thread chaouche yacine
Hello Viktor, I did my best at making most sense of the lines in the log file and made assumptions on timestamps to collect these lines where there should be an email from supp...@maghrebmedia.com to me (a.chaou...@mydomain.tld), although their SMTP client doesn't seem to appear here : Mar

Re: Client is always localhost

2017-03-06 Thread chaouche yacine
On Monday, March 6, 2017 4:10 PM, Viktor Dukhovni wrote: >You likely have most of the entries in master.cf chrooted, >and no log socket in chroot jail ($queue_directory/dev/log or similar). I have no smtpd line in my master.cf file, and since my postfix version is 2.X the default is to

Difference between the pass and unix types in master.cf

2017-03-07 Thread chaouche yacine
Hello list, man 5 master says that : <<>> [...] <<>> What does the part between "**" add or remove from a classic unix socket ? -- Yassine.

Re: Client is always localhost

2017-03-07 Thread chaouche yacine
Viktor, Reporting on my progress, I had two smtp lines in my master.cf, one is unix and the other is inet. Changed both of them to not be run in a chrooted environement : smtp inet n - n - - smtpd -o content_filter=spamassassin smtp unix - -

Re: Client is always localhost

2017-03-07 Thread chaouche yacine
On Tuesday, March 7, 2017 12:13 PM, "@lbutlr" wrote: > Really? I do not remember chroot ever being the default. Yet in master.cf I find this : # == # service type private unpriv chroot wakeup maxproc command + args #

Re: Client is always localhost

2017-03-07 Thread chaouche yacine
On Tuesday, March 7, 2017 1:12 PM, Wietse Venema wrote: > What Linux distribution is this? I am running Debian 8.5 root@messagerie[10.10.10.19] ~ # lsb_release -a No LSB modules are available. Distributor ID: Debian Description:Debian GNU/Linux 8.5 (jessie) Release:8.5 Codename:

Re: Setting amavis content_filter in main.cf

2017-03-09 Thread chaouche yacine
Hello Robert, Here's my setup : in main.cf : content_filter = amavis:[127.0.0.1]:10024 This tells postfix to use the amavis "service" (defined later in master.cf) to send all incoming mails to localhost port 10024 in master.cf : amavis unix - - - - 2 smtp -o smtp_data_done_time

Re: Setting amavis content_filter in main.cf

2017-03-09 Thread chaouche yacine
Interesting question. In my master.cf, I have two smtp services : one is listening on the internet SMTP port (25) and the other is listening locally on a unix socket root@messagerie-secours[CHROOT][10.10.10.19] /home/serveur # grep ^smtp /etc/postfix/master.cf smtp inet n - n

Re: Problems with lmtp

2017-03-17 Thread chaouche yacine
On Thursday, March 16, 2017 4:09 PM, Viktor Dukhovni wrote: >> The problem is then getting dovecot to understand what to do with that >> fully qualified user once it gets it. For my case, since the 'user' that >> postfix is mapping to is the same as the local Unix user I want it delivered >> to,

Re: Problems with lmtp

2017-03-17 Thread chaouche yacine
Thank you Thomas, so if I understand correctly in Viktor's config dovecot is only used by postfix as a backend to query for valid virtual email addresses ?

Re: Any warnings/suggestions for fail2ban?

2017-03-20 Thread chaouche yacine
Hi Doug, Here's how I configured my fail2ban > 1. I get hit with small floods of "Sender address rejected: Domain not found" > from the same sender. You can add this in filter.d/postfix.conf if you don't already have it (should be there on recent debian systems) failregex = ^%(__prefix_li

Re: Problems with lmtp

2017-03-22 Thread chaouche yacine
All clear ! thanks. On Friday, March 17, 2017 5:19 PM, Thomas Leuxner wrote: * chaouche yacine 2017.03.17 14:52: > Thank you Thomas, so if I understand correctly in Viktor's config dovecot is > only used by postfix as a backend to query for valid virtual email addr

Re: bitdefender

2017-03-22 Thread chaouche yacine
Hello David, I have no experience with any particular antivirus, but looking at /etc/amavisd-new/conf.d/15-av_scanners.conf I can see that bitdefender is supported. Since this is an amavis question you should get better luck asking in the amavis list instead. -- Yassine.

Re: Name service error for name=* type=AAAA, when it should be IPv4

2017-03-23 Thread chaouche yacine
On Wednesday, March 22, 2017 9:27 PM, Bastian Blank wrote: >- You run Postfix daemons chrooted? (check the chroot column in > /etc/postfix/master.cf) > >Bastian Nicely spotted. -- Yassine

Re: Mail queue with 110.000 mails

2017-03-27 Thread chaouche yacine
Hello, I am curious to know why do you have 110 000 mails in the mail queue to begin with ? are they all deferred mail ? and if so, can you report the log line that could contian the reason of the defer ? It happened to me once when I have (mis)configured quotas for my users. When a user was

Re: Another yahoo problem

2017-03-30 Thread chaouche yacine
On Thursday, March 30, 2017 4:09 PM, "li...@lazygranch.com" wrote: >Perhaps sslv3 related. >http://disablessl3.com/ Thanks for the valuable link. -- Yassine.

Re: Postfix TLS/SSL with wildcard SSL certificate

2017-04-12 Thread chaouche yacine
Viktor, In this piece of code, why write to a .tmp file then immediately rename it without any prior processing ? > # umask 077 > # openssl pkcs12 -nodes -in /some/where/keypair.pfx \ > -out /etc/postfix/certkey.pem.tmp > # mv /etc/postfix/certkey.pem.tmp /etc/postfix/certkey.pem > # postconf

Re: Postfix TLS/SSL with wildcard SSL certificate

2017-04-12 Thread chaouche yacine
Nice ! thanks Skip.

Re: SPF best practices

2017-05-09 Thread chaouche yacine
Hello Volker, What you need to do is tell other mail servers that they should accept mail from server2 on behalf of server1. If server1 is server1.yourdomain.comand server2 is server2.anotherdomain.com then you should list anotherdomain.com in your spf. If server2 doesn't have a domain name, you

Re: Postfix, mailman, and aliases problem

2017-10-26 Thread chaouche yacine
Make sure you're using the /etc/aliases is actually used as your alias_database root@messagerie[10.10.10.19] ~ # postconf alias_database alias_database = hash:/etc/aliases root@messagerie[10.10.10.19] ~ # Here's mine root@messagerie[10.10.10.19] ~ # cat /etc/aliases # /etc/aliases mailer-daemo

Re: monitoring outgoing emails

2018-03-28 Thread chaouche yacine
I use this line : tail -f /var/log/mail.log | egrep --line-buffered 'Relay' | egrep --line-buffered -v '(Process_Control|notifications.systemes|PODCAST-|Admin-ch|PUB_CONTROL|@mydomain.tld|r...@mydomain.tld' | sed -u 's/messagerie-prep amavis.*},//;s/Hits:\([^,]\+\).*/HITS:\1/; s/\(Queue-ID\|M

Re: monitoring outgoing emails

2018-03-29 Thread chaouche yacine
ydomain. tld' > | sed -u 's/messagerie-prep amavis.*},//;s/Hits:\([^,]\+\) .*/HITS:\1/; > s/\(Queue-ID\|Message-ID\).*, > HITS/Hits/'|grep "$REGX_EMAIL ->" > grep: Unmatched ( or \( > > I use: > ps -eo user|sort|uniq -c|sort -n > ps -aux | g

Re: monitoring outgoing emails

2018-03-29 Thread chaouche yacine
Hits/Hits/;s/Hits:\([^,]\+\).*/Hits:\1/ | grep --color=always $REGX_EMAIL > > ^C root@s1:~# echo $REGX_EMAIL root@s1:~# Should I have some additional file or should I add some parameter? 2018-03-29 12:57 GMT+02:00 chaouche yacine : Sorry there was a mistake in the line I gave you, m

Re: monitoring outgoing emails

2018-03-29 Thread chaouche yacine
appens but under above command I have sign > and next to it is console cursor. My hostname is "s1". 2018-03-29 14:31 GMT+02:00 chaouche yacine : 6/ You should probably define REGEX_EMAIL as '<[^@<>]*@[^@<>]*\.[^@<>]*>', I have that in my .bashrc b/c

Re: monitoring outgoing emails

2018-03-29 Thread chaouche yacine
It is, that's the spam score. It helps to visualise if a particular mailbox is bombarded with spam (can happen with lots and lots of e-mails from qq.com, I have that domain banned in postfix itself). Yassine. On Thursday, March 29, 2018, 3:21:16 PM GMT+1, Alex JOST wrote: Am 29.03.20

Re: monitoring outgoing emails

2018-03-30 Thread chaouche yacine
an email when from particular email account will outbound for example 300 emails per day. Kind of warning. But I am not sure I could use spam score to it. What do you think guys about it? 2018-03-29 17:58 GMT+02:00 chaouche yacine : It is, that's the spam score. It helps to visualise i

Re: monitoring outgoing emails

2018-03-30 Thread chaouche yacine
On Friday, March 30, 2018, 10:44:27 AM GMT+2, Poliman - Serwis wrote: Yassine, appreciate your answer. I will check further in it but do you think that spam score could help with estimate which mail from which account is or not spam? 2018-03-30 9:27 GMT+02:00 chaouche yacine : Here are

Re: monitoring outgoing emails

2018-04-04 Thread chaouche yacine
il.log which are in line with "from=" part? Hmm I hope I say clear. I need count emails from particular mailbox. Can I base on "from="? For example: Apr  3 11:49:48 s1 postfix/qmgr[722]: 3B8C313BE2D: from=, size=4000, nrcpt=1 (queue active) 2018-03-30 17:52 GMT+02:00 chaouche

Re: monitoring outgoing emails

2018-04-05 Thread chaouche yacine
No it won't, it will simply group qids together so that you can trace individual e-mails, instead of having intermingled log lines from different e-mails. On Thursday, April 5, 2018, 7:10:11 AM GMT+1, Viktor Dukhovni wrote: > On Apr 5, 2018, at 2:07 AM, Poliman - Serwis wrote:

Re: monitoring outgoing emails

2018-04-05 Thread chaouche yacine
would have only one line from log dependent from particular email sent. 2018-04-05 12:31 GMT+02:00 chaouche yacine : No it won't, it will simply group qids together so that you can trace individual e-mails, instead of having intermingled log lines from different e-mails. On Th

Re: monitoring outgoing emails

2018-04-05 Thread chaouche yacine
m looking some pattern I could base. 2018-04-05 14:30 GMT+02:00 chaouche yacine : I was talking about collate.pl On Thursday, April 5, 2018, 12:04:45 PM GMT+1, Poliman - Serwis wrote: Yacine, do you say about collate.pl script or "from=" part from log file? I suppose that ab

Re: monitoring outgoing emails

2018-04-05 Thread chaouche yacine
; in log file. I tried production server and finally I see it and I know what you suggest me. It looks like: Apr  5 15:11:56 s1 amavis[26789]: (26789-13) Passed CLEAN {RelayedOutbound}, LOCAL [127.0.0.1] -> Is it the line about which you said? 2018-04-05 14:53 GMT+02:00 chaouche yacine :

Re: Read Only account

2018-04-22 Thread chaouche yacine
I use rob0's second suggestion which is using a map, it doesn't require that the user is authenticated. in main.cf smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/maps/reject_senders in maps/reject_senders qq.com  REJECT   # Reject any mail from the qq.com d