Hi. I need your help to resolv a problem with Postfix on Centreon to send alerts via email.
Iam sure There is something wrong in my configuration because i still can´t send by email the alerts.
Can help me with this issue.
Regards.
Hi. I need your help to resolv a problem with Postfix on Centreon to send alerts via email.
Iam sure There is something wrong in my configuration because i still can´t send by email the alerts.
Can help me with this issue.
Regards.
Hello
Could you be more specific ?
What are your tests and the related logs ?
Hi Kriko.
When i try to send a email from my centos 7 linux server using postfix on centreon i cant send email.
i attached the logs when i try to send a test email from command line interface.
[root@dmxdmcentreonone postfix]# echo "This is a test send email" | mail -s "Prueba de correo" RelayMP0365@naturalsystem.com
[root@dmxdmcentreonone postfix]# tail -f /var/log/maillog
Apr 25 15:30:25 dmxdmcentreonone postfix/qmgr[15126]: 7F876100E1EA: removed
Apr 25 15:45:26 dmxdmcentreonone postfix/postfix-script[16185]: stopping the Postfix mail system
Apr 25 15:45:26 dmxdmcentreonone postfix/master[15124]: terminating on signal 15
Apr 25 15:45:56 dmxdmcentreonone postfix/postfix-script[16294]: starting the Postfix mail system
Apr 25 15:45:56 dmxdmcentreonone postfix/master[16296]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr 25 15:46:27 dmxdmcentreonone postfix/pickup[16297]: 44B65100E1E6: uid=0 from=<root>
Apr 25 15:46:27 dmxdmcentreonone postfix/cleanup[16357]: 44B65100E1E6: message-id=<20220425204627.44B65100E1E6@dmxdmcentreonone>
Apr 25 15:46:27 dmxdmcentreonone postfix/qmgr[16298]: 44B65100E1E6: from=<root@mx.naturalsystem.com>, size=491, nrcpt=1 (queue active)
Apr 25 15:46:27 dmxdmcentreonone postfix/smtp[16359]: 44B65100E1E6: to=<RelayMP0365@naturalsystem.com>, relay=10.205.3.116[10.205.3.116]:25, delay=0.09, delays=0.02/0.02/0/0.05, dsn=2.6.0, status=sent (250 2.6.0 <20220425204627.44B65100E1E6@dmxdmcentreonone> Queued mail for delivery)
Apr 25 15:46:27 dmxdmcentreonone postfix/qmgr[16298]: 44B65100 E1E6: removed
[root@dmxdmcentreonone postfix]# telnet 10.205.3.116 25
Trying 10.205.3.116...
Connected to 10.205.3.116.
Escape character is '^]'.
220 dmmexrel170.mx.naturalsystem.com Microsoft ESMTP MAIL Service, Version: 8.5.9600.16384 ready at Mon, 25 Apr 2022 15:21:52 -0500
ehlo
250-dmmexrel170.mx.naturalsystem.com Hello [10.206.3.170]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
mail from: localhost
250 2.1.0 localhost@mx.naturalsystem.com....Sender OK
rcpt to: RelayMP0365@naturalsystem.com
250 2.1.5 RelayMP0365@naturalsystem.com
Hello
Could you be more specific ?
What are your tests and the related logs ?
Hi Kriko.
When i try to send a email from my centos 7 linux server using postfix on centreon i cant send email.
i attached the logs when i try to send a test email from command line interface.
[root@dmxdmcentreonone postfix]# echo "This is a test send email" | mail -s "Prueba de correo" RelayMP0365@naturalsystem.com
[root@dmxdmcentreonone postfix]# tail -f /var/log/maillog
Apr 25 15:30:25 dmxdmcentreonone postfix/qmgr[15126]: 7F876100E1EA: removed
Apr 25 15:45:26 dmxdmcentreonone postfix/postfix-script[16185]: stopping the Postfix mail system
Apr 25 15:45:26 dmxdmcentreonone postfix/master[15124]: terminating on signal 15
Apr 25 15:45:56 dmxdmcentreonone postfix/postfix-script[16294]: starting the Postfix mail system
Apr 25 15:45:56 dmxdmcentreonone postfix/master[16296]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr 25 15:46:27 dmxdmcentreonone postfix/pickup[16297]: 44B65100E1E6: uid=0 from=<root>
Apr 25 15:46:27 dmxdmcentreonone postfix/cleanup[16357]: 44B65100E1E6: message-id=<20220425204627.44B65100E1E6@dmxdmcentreonone>
Apr 25 15:46:27 dmxdmcentreonone postfix/qmgr[16298]: 44B65100E1E6: from=<root@mx.naturalsystem.com>, size=491, nrcpt=1 (queue active)
Apr 25 15:46:27 dmxdmcentreonone postfix/smtp[16359]: 44B65100E1E6: to=<RelayMP0365@naturalsystem.com>, relay=10.205.3.116[10.205.3.116]:25, delay=0.09, delays=0.02/0.02/0/0.05, dsn=2.6.0, status=sent (250 2.6.0 <20220425204627.44B65100E1E6@dmxdmcentreonone> Queued mail for delivery)
Apr 25 15:46:27 dmxdmcentreonone postfix/qmgr[16298]: 44B65100 E1E6: removed
[root@dmxdmcentreonone postfix]# telnet 10.205.3.116 25
Trying 10.205.3.116...
Connected to 10.205.3.116.
Escape character is '^]'.
220 dmmexrel170.mx.naturalsystem.com Microsoft ESMTP MAIL Service, Version: 8.5.9600.16384 ready at Mon, 25 Apr 2022 15:21:52 -0500
ehlo
250-dmmexrel170.mx.naturalsystem.com Hello [10.206.3.170]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
mail from: localhost
250 2.1.0 localhost@mx.naturalsystem.com....Sender OK
rcpt to: RelayMP0365@naturalsystem.com
250 2.1.5 RelayMP0365@naturalsystem.com
Do you have configure 10.205.3.116 as you relayhost in your postfix configuration ?
I see Exchange when you've done the Telnet, maybe this tuto could you help you: https://carlosvargas.com/how-to-configure-your-linux-postfix-server-to-forward-email-to-exchange-server-2013/amp/
Do you have configure 10.205.3.116 as you relayhost in your postfix configuration ?
I see Exchange when you've done the Telnet, maybe this tuto could you help you: https://carlosvargas.com/how-to-configure-your-linux-postfix-server-to-forward-email-to-exchange-server-2013/amp/
Yes i have configured in the main.cfg file
#cat main.cf
myhostname = dmxdmcentreonone
relayhost = [0.205.3.116]:25
mydomain = mx.naturalsystem.com
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
[root@dmxdmcentreonone postfix]#
It’s me or you have a typo in the relay host defintion:
relayhost = [0.205.3.116]:25
should be
relayhost = [10.205.3.116]:25
no ?
And could you try to send your mail using the account define in hash:/etc/postfix/sasl_passwd with the following command
mail -r youraccount@yourdomain.com
Hi yes was a type error.
relayhost = [10.205.3.116]:25 OK
So is it fixed ?
What about the test using mail -r theadresse@yourdomain define in your postfix conf ?
Hi Kriko this is the output of mail command
# mail -r RelayMP0365@naturalsystem.com
Send options without primary recipient specified.
Usage: mail -eiIUdEFntBDNHRVv~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
Hello Jose,
I guess that you need to something like this:
mail -r RelayMP0365@naturalsystem.com youradresse@mail.com
Then you should type the object of your test mail.
And the body.
Once you finish you type ENTER and then a point (to tell to mail command that you have finish)
Hi Kriko i made the test.
But i still get the same error in the log
[root@dmxdmcentreonone postfix]# mail -r RelayMP0365@naturalsystem.com tsya4mx@natsystem.com
Subject: testemail
prueba de correo
.
EOT
[root@dmxdmcentreonone postfix]# tail /var/log/maillog
Apr 25 17:42:09 dmxdmcentreonone postfix[23712]: fatal: usage: postfix [-c config_dir] [-Dv] command
Apr 25 17:48:38 dmxdmcentreonone postfix/postfix-script[24193]: stopping the Postfix mail system
Apr 25 17:48:38 dmxdmcentreonone postfix/master[21367]: terminating on signal 15
Apr 25 17:48:38 dmxdmcentreonone postfix/postfix-script[24270]: starting the Postfix mail system
Apr 25 17:48:38 dmxdmcentreonone postfix/master[24272]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr 27 11:07:01 dmxdmcentreonone postfix/pickup[15862]: 9A3C0100B8E2: uid=0 from=<RelayMP0365@naturalsystem.com>
Apr 27 11:07:01 dmxdmcentreonone postfix/cleanup[20647]: 9A3C0100B8E2: message-id=<62696a25.L0ohuf9JTXCRBCcN%RelayMP0365@naturalsystem.com>
Apr 27 11:07:01 dmxdmcentreonone postfix/qmgr[24275]: 9A3C0100B8E2: from=<RelayMP0365@naturalsystem.com>, size=475, nrcpt=1 (queue active)
Apr 27 11:07:01 dmxdmcentreonone postfix/smtp[20649]: 9A3C0100B8E2: to=<tsya4mx@natsystem.com>, relay=10.205.3.116[10.205.3.116]:25, delay=0.1, delays=0.02/0.02/0/0.05, dsn=2.6.0, status=sent (250 2.6.0 <62696a25.L0ohuf9JTXCRBCcN%RelayMP0365@naturalsystem.com> Queued mail for delivery)
Apr 27 11:07:01 dmxdmcentreonone postfix/qmgr[24275]: 9A3C0100B8E2: removed
[root@dmxdmcentreonone postfix]#
Weird your mail have been correctly forward to 10.205.3.116.
Nothing on this server ?
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.