PDA

View Full Version : Problem with send mail... again


Brox
26th May 2006, 00:12
Hello!

1. Sorry for english :)
2. I read another topics about this problem, but find not solution...
System: Debian 3.1 (perfect_setup...) fresh...

Problem with sending mail to external domain from external subnet:
log:
May 26 00:43:08 hive1 postfix/smtpd[27237]: warning: smtpd_peer_init: My_IP: hostname My_Hostname verification failed: Name or service not known
May 26 00:43:08 hive1 postfix/smtpd[27237]: connect from unknown[My_IP]
May 26 00:43:13 hive1 postfix/smtpd[27237]: NOQUEUE: reject: RCPT from unknown[My_IP]: 554 <Ext_domain_mbox>: Relay access denied; from=<Hosting_domain_mbox> to=<Ext_domain_mbox> proto=ESMTP helo=<vault2>
May 26 00:43:13 hive1 postfix/smtpd[27237]: disconnect from unknown[My_IP]

if i add My_IP to mynetworks, then mail send ok, but without auth.
if i add Ext_domain to relay_domains, then ok too, w/o auth.
"server requires auth." and "(SMTP) server requires SSL" in stmp-client checked - but not work...
...
and... what i need input in "login" throw webmail (UebiMiau or Roundcube)? :D

With best regards...

falko
26th May 2006, 02:32
if i add My_IP to mynetworks, then mail send ok, but without auth.That's ok.
if i add Ext_domain to relay_domains, then ok too, w/o auth.That's ok, too.
"server requires auth." and "(SMTP) server requires SSL" in stmp-client checked - but not work...What's the output if you run
telnet localhost 25 and then ehlo localhost?


and... what i need input in "login" throw webmail (UebiMiau or Roundcube)? :D

For Uebimiau you must login with an email address of the user and his password.

Brox
26th May 2006, 09:07
What's the output if you run
telnet localhost 25
and then
ehlo localhost
?
ehlo localhost
250-Hostname
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
For Uebimiau you must login with an email address of the user and his password.
e-mail: user@domain.tld ?
not work... say:
You cannot login with the username and password entered.
Please check your username and password and try again.
I just installed .pkg through ispconfig-web... need any extra configuration ?

falko
26th May 2006, 17:12
ehlo localhost
250-Hostname
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIMEThat's ok. Is saslauthd running? Make sure your firewall doesn't block port 25, and enable "Server requires authentication" in your email client, as shown here: http://mail.cs.uiuc.edu/relay/outlook-config.html

e-mail: user@domain.tld ?
not work... say:
You cannot login with the username and password entered.
Please check your username and password and try again.
I just installed .pkg through ispconfig-web... need any extra configuration ?Does that email address belong to the user with which you want to log in?

Brox
30th May 2006, 16:54
That's ok. Is saslauthd running?
ps -ax |grep saslauthd
Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
2234 ? Ss 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
2235 ? S 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
2236 ? S 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
2237 ? S 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
2238 ? S 0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
7420 ? Ss 0:00 saslauthd -a getpwent
7421 ? S 0:00 saslauthd -a getpwent
7422 ? S 0:00 saslauthd -a getpwent
7423 ? S 0:00 saslauthd -a getpwent
7424 ? S 0:00 saslauthd -a getpwent
25714 pts/0 S+ 0:00 grep saslauthd

Make sure your firewall doesn't block port 25, and enable "Server requires authentication" in your email client, as shown here: http://mail.cs.uiuc.edu/relay/outlook-config.html

Firewall doesn't block... outlook config as in html...

Does that email address belong to the user with which you want to log in?

yes.
username: web1_info
email: info@domain.tld
webmail:
email: info@domain.tld
password: password_for_web1_info

falko
30th May 2006, 17:39
What's in /etc/postfix/main.cf (please leave out the comments)?

Brox
30th May 2006, 21:44
What's in /etc/postfix/main.cf (please leave out the comments)?
In the begin, main.cf was fresh (by perfect setup), but mail wasn't sent then.
Now, main.cf is a little changed and mail isn't sent again... :)

===/etc/postfix/main.cf===

smtpd_banner = $myhostname ESMTP $mail_name
biff = no

append_dot_mydomain = no

myhostname = hostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
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 =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipients_restrictions = permit_sasl_authenticated,permit_mynetworks
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
mtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

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

smtpd_client_restrictions = permit_sasl_authenticated

falko
31st May 2006, 01:07
Please run

postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination'
postconf -e 'inet_interfaces = all'
postconf -e 'smtpd_tls_auth_only = no'
postconf -e 'smtp_use_tls = yes'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'and comment out the
smtpd_client_restrictions = permit_sasl_authenticated
line. Then restart Postfix.

Brox
31st May 2006, 15:07
Please run
postconf -e 'smtpd_sasl_local_domain ='
...and comment out the
smtpd_client_restrictions = permit_sasl_authenticated
line. Then restart Postfix.
done. It's work ! :)
strange... this settings from perfect_setup... but didn't work in the begin...
may be because i used ", not '? Distinction only in it... :)

Thanks a lot !

...Problem solved...