Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st April 2006, 18:40
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Exclamation Can not receive e-mail - Postfix

I only can send e-mail using my postfix server.

When i send an email to one of my domains on the server, there is an error in the emailclient:

Remote-MTA: DNS; server1.mydomain.tld
Diagnostic-Code: SMTP; 554 : Relay access denied

I checked the Postfix configuration file by comparing it with the version mentioned here:

http://www.howtoforge.com/perfect_setup_debian_sarge_p4

Everything seems to be ok in my configuration file, so why this problem?

I do not understand!

What could be wrong?

Hans

Last edited by Hans; 1st April 2006 at 19:35.
Reply With Quote
Sponsored Links
  #2  
Old 1st April 2006, 20:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

Have you set "server needs authentication" in the smtp settings of your email client?

If you use ISPConfig, do you have this line in your postfix main.cf file:

mydestination = /etc/postfix/local-host-names
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 1st April 2006, 21:22
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Arrow Strange behaviour sending/receiving e-mails - Postfix

There was a line in /etc/postfix/main.cf :

mydestination = server1.mydomain.tld, localhost.mydomain.tld, localhost

I changed it in:

#mydestination = server1.mydomain.tld, localhost.mydomain.tld, localhost

I added your suggested line instead:

mydestination = /etc/postfix/local-host-names

My Postfix main.cf file looks now like:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
myhostname = server1.mydomain.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = server1.mydomain.tld, localhost.mydomain.tld, localhost
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

---
After this modification i restarted Postfix with:
/etc/init.d/postfix restart


When i use my e-mailclient, the mailserver does not recognise my username/password.
"server needs authentication" is on (of course).

When i send an e-mail from the outside world to an e-mailaddress which belongs to one of the domains on my server, it wil NOT reach the mailbox and it is not bounced back to me!

The output of command grep -i smtp /etc/services :
smtp 25/tcp mail
ssmtp 465/tcp smtps # SMTP over SSL

I have also discovered that saslauthd is not always running.
When i do an /etc/init.d/saslauthd start
it results into:
Starting SASL Authentication Daemon: (failed).
The output of ps aux|grep saslauthd:

root 4225 0.0 0.2 34900 2396 ? Ss 21:05 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root 4226 0.0 0.2 34900 2392 ? S 21:05 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root 4227 0.0 0.2 34900 2396 ? S 21:05 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root 4228 0.0 0.2 34900 2396 ? S 21:05 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root 4229 0.0 0.2 34900 2396 ? S 21:05 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root 9059 0.0 0.0 2908 620 pts/1 S+ 22:12 0:00 grep saslauthd

I could start saslauthd again after killing the processes according:

kill -9 4225
kill -9 4226
kill -9 4227
kill -9 4228
kill -9 4229

/etc/init.d/saslauthd start

saslauthd was started, but it did not solve my problem with receiving/sending emails.


For me this is a serious problem, how can it be solved?

I hope someone can help me.


Hans

Last edited by Hans; 1st April 2006 at 22:16.
Reply With Quote
  #4  
Old 2nd April 2006, 17:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

Please rerun the configuration steps for post´fix and courier as described here:

http://www.howtoforge.com/perfect_setup_debian_sarge_p4

Do you have ISPConfig installed?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 2nd April 2006, 19:25
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Post Postfix reinstallation

Yes, Till i have ISPConfig (last stable version) installed.

Can i just rerun the setup for Postfix?

Or do i have to remove the existing Postfix files first with apt-get remove --purge ..., before is start again?

I also have checked my /var/log/mail.log file.
When i have send an e-mail to an e-mailaddress on the server it does not reach it.
In every line of the logfile: nmsgs=0 ndele=0

Hans

Last edited by Hans; 2nd April 2006 at 21:06.
Reply With Quote
  #6  
Old 2nd April 2006, 22:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by Hans
Yes, Till i have ISPConfig (last stable version) installed.

Can i just rerun the setup for Postfix?
Yes.

Quote:
Originally Posted by Hans
Or do i have to remove the existing Postfix files first with apt-get remove --purge ..., before is start again?
No, you don't need this. But after
Code:
apt-get install postfix ...
you should run
Code:
dpkg-reconfigure postfix
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 3rd April 2006, 12:46
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Default

Thanks for your reply!

Everything is up and running again.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not receiving any incoming mail. Jcorrea920 General 11 3rd April 2010 13:08
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
Mail using postfix receive but cannot send garfabian Installation/Configuration 17 2nd September 2006 13:55
Postfix mail is held in queue indefinitely... squallbsr Server Operation 9 15th January 2006 19:13
postfix starts and stops why lhatle Installation/Configuration 2 21st December 2005 15:20


All times are GMT +2. The time now is 23:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.