LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-20-2016, 08:26 AM   #1
GrayGhost93
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Rep: Reputation: Disabled
Getting Postfix to Work under CentOS 7


Hi, I have some troubles to get postfix to work with an external smtp server, which is using starttls. Can someone help me please?

Maillog:

Code:
Jul 20 15:05:16 hostname postfix/master[16799]: daemon started -- version 2.10.1, configuration /etc/postfix
Jul 20 15:05:50 hostname postfix/pickup[16800]: 2E57E8000D6B: uid=0 from=<root>
Jul 20 15:05:50 hostname postfix/cleanup[16806]: 2E57E8000D6B: message-id=<20160720130550.2E57E8000D6B@hostname.localdomain>
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 2E57E8000D6B: from=<root@hostname.localdomain>, size=463, nrcpt=1 (queue active)
Jul 20 15:05:50 hostname postfix/cleanup[16806]: 32F968000D6E: message-id=<20160720130550.2E57E8000D6B@hostname.localdomain>
Jul 20 15:05:50 hostname postfix/local[16808]: 2E57E8000D6B: to=<root@hostname.localdomain>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (forwarded as 32F968000D6E)
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 32F968000D6E: from=<root@hostname.localdomain>, size=609, nrcpt=1 (queue active)
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 2E57E8000D6B: removed
Jul 20 15:05:50 hostname postfix/smtp[16809]: 32F968000D6E: to=<admin@hostname.de>, orig_to=<root>, relay=mail.udmedia.de[194.117.254.48]:587, delay=0.33, delays=0/0.02/0.28/0.03, dsn=5.0.0, status=bounced (host mail.udmedia.de[194.117.254.48] said: 550 SMTP AUTH required (in reply to MAIL FROM command))
Jul 20 15:05:50 hostname postfix/cleanup[16806]: 8D7AF8000D6B: message-id=<20160720130550.8D7AF8000D6B@hostname.localdomain>
Jul 20 15:05:50 hostname postfix/bounce[16811]: 32F968000D6E: sender non-delivery notification: 8D7AF8000D6B
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 8D7AF8000D6B: from=<>, size=2602, nrcpt=1 (queue active)
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 32F968000D6E: removed
Jul 20 15:05:50 hostname postfix/cleanup[16806]: 8EC808000D6E: message-id=<20160720130550.8D7AF8000D6B@hostname.localdomain>
Jul 20 15:05:50 hostname postfix/local[16808]: 8D7AF8000D6B: to=<root@hostname.localdomain>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (forwarded as 8EC808000D6E)
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 8EC808000D6E: from=<>, size=2748, nrcpt=1 (queue active)
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 8D7AF8000D6B: removed
Jul 20 15:05:50 hostname postfix/smtp[16809]: 8EC808000D6E: to=<admin@hostname.de>, orig_to=<root@hostname.localdomain>, relay=mail.udmedia.de[194.117.254.48]:587, delay=0.29, delays=0/0/0.26/0.03, dsn=5.0.0, status=bounced (host mail.udmedia.de[194.117.254.48] said: 550 SMTP AUTH required (in reply to MAIL FROM command))
Jul 20 15:05:50 hostname postfix/qmgr[16801]: 8EC808000D6E: removed
/etc/postfix/main.cf:

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myorigin = $myhostname
inet_interfaces = localhost
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.2.0/24, 127.0.0.0/8
relayhost = mail.udmedia.de:587
smtpd_sasl_path = smtpd
smtp_sasl_auth_enable = yes
smtp_sasl_type = cyrus
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_sasl_tls_security_options = noanonymous
smtp_use_tls = yes
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
smtpd_banner = $myhostname ESMTP
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
I just have no idea, why it's not working :/

Thanks allready!
 
Old 07-21-2016, 02:37 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Your postfix looks to be working fine.
Your relay wants you to authenticate properly.
edit: Having an external alias's for local addresses is usually a bad idea, until your setup is working properly anyway.

Last edited by descendant_command; 07-21-2016 at 02:42 AM.
 
Old 07-21-2016, 02:52 AM   #3
GrayGhost93
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
Your postfix looks to be working fine.
Your relay wants you to authenticate properly.
edit: Having an external alias's for local addresses is usually a bad idea, until your setup is working properly anyway.

Okay, thanks for the reply. I just thought this would be the better idea. Is it possible to configure postfix just for sending me some mails to an external adress without an external smtp-server? I don't need to get some mails on the server. I just want to send the output of logwatch. But it is still quiet confusing to me to configure it ...
 
Old 07-21-2016, 03:29 AM   #4
GrayGhost93
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
I configured the generic.db file as well. Seems it was not working because the FROM field was not right. Not sure, but it works now
 
Old 07-22-2016, 07:55 AM   #5
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Nice.
Quote:
Originally Posted by GrayGhost93 View Post
I don't need to get some mails on the server. I just want to send the output of logwatch. But it is still quiet confusing to me to configure it ...
ssmtp is a nice small easy alternative that I have used in such situations.

Last edited by descendant_command; 07-22-2016 at 07:56 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix: work well with yahoo, hotmail, gmail, but not work with some domain computerz_man Linux - Server 1 04-05-2013 12:58 AM
Get postfix to retry on maildir delivery failure (postfix 2.6.6, Centos 6.3)? gaweinberg Linux - Server 0 01-20-2013 08:45 PM
Email with Postfix,Dovecot & MySQL on CentOS 5-CentOS 6 issues redhat19 Linux - Server 6 05-12-2012 09:15 AM
New install of Centos 5.5 will not work on net work with fixed IP or DHCP JohnScub164 Linux - Networking 2 01-15-2011 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration