darold / sendmailanalyzer

Sendmail log Analyzer is a tool to monitor sendmail usage and generate HTML and graph reports. It reports all you ever wanted to know about email trafic on your network. You can also use it in ISP environment with per domain and per mailbox report.
http://sendmailanalyzer.darold.net/
GNU General Public License v3.0
76 stars 13 forks source link

MAIL_GW parameter #33

Closed dedisoft closed 8 years ago

dedisoft commented 9 years ago

Hi,

I have some difficulties to configure the MAIL_GW parameter.

On file senders.dat, no relay is stored for mail managed by the server (the last field is empty on each line).

So there is non difference between external/internal mails.

Is this normal ?

Regards,

darold commented 9 years ago

Hi,

I don't know. Could you post your configuration file and some email anonymized lines of your log file?

Regards

dedisoft commented 9 years ago

Hi,

A precision : field is empty for mail on local delivery (domains managed by the server). Fields are ok for outgoing mail.

Lines from the mail.log :

Nov 22 07:48:09 plesk postfix/smtpd[18589]: connect from mta.smtp.wyz.com[1.2.3.4] Nov 22 07:48:09 plesk postfix/smtpd[18589]: 47CDB2A5: client=mta.smtp.wyz.com[1.2.3.4] Nov 22 07:48:09 plesk postfix/cleanup[19713]: 47CDB2A5: message-id=1-92040169-065-914012@domainsender.com Nov 22 07:48:09 plesk /usr/lib/plesk-9.0/psa-pc-remote[9293]: handlers_stderr: SKIP Nov 22 07:48:09 plesk /usr/lib/plesk-9.0/psa-pc-remote[9293]: SKIP during call 'check-quota' handler Nov 22 07:48:09 plesk postfix/qmgr[9605]: 47CDB2A5: from=news@domainsender.com, size=22306, nrcpt=1 (queue active) Nov 22 07:48:09 plesk postfix-local[19924]: postfix-local: from=news@domainsender.com, to=user@destdomain.net, dirname=/var/qmail/mailnames Nov 22 07:48:09 plesk dovecot: service=lda, user=user@destdomain.net, ip=[]. copy from stdin: box=INBOX, uid=47792, msgid=1-92040169-065-914012@domainsender.com, size=22100 Nov 22 07:48:09 plesk dovecot: service=lda, user=user@destdomain.net, ip=[]. msgid=1-92040169-065-914012@domainsender.com: saved mail to INBOX Nov 22 07:48:09 plesk plesk sendmail[19929]: handlers_stderr: SKIP Nov 22 07:48:09 plesk plesk sendmail[19929]: SKIP during call 'check-quota' handler Nov 22 07:48:09 plesk postfix/pipe[19715]: 47CDB2A5: to=user@destdomain.net, relay=plesk_virtual, delay=0.17, delays=0.11/0/0/0.06, dsn=2.0.0, status=sent (delivered via plesk_virtual service) Nov 22 07:48:09 plesk postfix/qmgr[9605]: 47CDB2A5: removed

Regards,

darold commented 9 years ago

Ok, you just need to add plesk_virtual to the list of host where mail are redirected or delivered, ex:

MAIL_HUB    127.0.0.1,plesk_virtual

as message are distributed localy and the recipient relay is set to plesk_virtual. MAIL_GW must remain empty.

In the configutation file it is said that you must use ip addresses but this is in the case where recipient relay is written like follow:

localhost[127.0.0.1]

in this case this sendmailanalyzer will extract the ip address and use it instead of fsqn. Here you just have a name, so sendmailanalyzer will take it as recipient relay/

Regards,