
1st April 2006, 18:40
|
|
Moderator
|
|
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,252
Thanks: 208
Thanked 642 Times in 291 Posts
|
|
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.
|

1st April 2006, 20:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,897
Thanks: 693
Thanked 4,190 Times in 3,208 Posts
|
|
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
|

1st April 2006, 21:22
|
|
Moderator
|
|
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,252
Thanks: 208
Thanked 642 Times in 291 Posts
|
|
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.
|

2nd April 2006, 17:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,897
Thanks: 693
Thanked 4,190 Times in 3,208 Posts
|
|
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?
|

2nd April 2006, 19:25
|
|
Moderator
|
|
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,252
Thanks: 208
Thanked 642 Times in 291 Posts
|
|
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.
|

2nd April 2006, 22:07
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
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
|

3rd April 2006, 12:46
|
|
Moderator
|
|
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,252
Thanks: 208
Thanked 642 Times in 291 Posts
|
|
Thanks for your reply!
Everything is up and running again.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 12:22.
|
Recent comments
6 hours 35 min ago
13 hours 16 min ago
17 hours 6 min ago
18 hours 45 min ago
1 day 3 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 17 hours ago
1 day 21 hours ago
1 day 21 hours ago