Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That's fine but I'm sure this no longer your problem.
> Still failed.
> Tried changing "/etc/postfix/sasl_passwd" as "/etc/postfix/sasl_passwd.db" without result.
$ sudo postmap /etc/postfix/sasl_passwd
The above command will create sasl_passwd.db then restart postfix.
Please try to create the script below and execute after you have dialed through PPPoE to restore your original
/etc/resolv.conf in order to restore the line 'lookup file bind' and to prevent resolution problem. It might
be that everytime you redialed, it replaces your resolv.conf since your are dynamic. Or figure out in your
distro on how to disable automatic DNS discovery. To give you an idea in OpenBSD's ppp.conf there is a
line used for PPPoE that says 'enable dns' and I'm just commenting this out and that will prevent on replacing my
resolv.conf. Find out its equivalent in Ubuntu.
> Or figure out in your distro on how to disable automatic DNS discovery. To give you an idea in OpenBSD's ppp.conf there is a
> line used for PPPoE that says 'enable dns' and I'm just commenting this out and that will prevent on replacing my
> resolv.conf. Find out its equivalent in Ubuntu.
If you prefer the above over the manual script, you will need to run BIND in your box as local
resolver/caching server and replace your two nameservers (or just comment them out) with
'nameserver 127.0.0.1'.
But always do this as root and not as your admin user because if someone intercepted your message on the
internet they already know your admin username and it is just simply guessing your password.
Also don't enable PermitRootLogin in /etc/ssh/sshd_config by removing the comment and change 'yes' to 'no'
and then restart sshd.
The above command will create sasl_passwd.db then restart postfix.
$ sudo postmap /etc/postfix/sasl_passwd
$ ls /etc/postfix/ | grep sasl
Code:
sasl
sasl_passwd
sasl_passwd.db
# telnet localhost 25
Code:
Trying 127.0.0.1...
Connected to localhost.satimis.freeddns.com.
Escape character is '^]'.
220 mail.satimis.freeddns.com ESMTP Postfix (Ubuntu)
ehlo satimis.freeddns.com
250-mail.satimis.freeddns.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
mail from: satimis@satimis.freeddns.com
250 Ok
rcpt to: satimis@yahoo.com
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Test
This is a test
.
250 Ok: queued as 1F52775403E
quit
221 Bye
# tail -f /var/log/mail.log
Code:
Password:
Dec 7 20:38:41 mail postfix/smtpd[5732]: connect from localhost.satimis.freeddns.com[127.0.0.1]
Dec 7 20:39:52 mail postfix/smtpd[5732]: 1F52775403E: client=localhost.satimis.freeddns.com[127.0.0.1]
Dec 7 20:40:17 mail postfix/cleanup[5726]: 1F52775403E: message-id=<20061207123952.1F52775403E@mail.satimis.freeddns.com>Dec 7 20:40:17 mail postfix/qmgr[5631]: 1F52775403E: from=<satimis@satimis.freeddns.com>, size=428, nrcpt=1 (queue active)
Dec 7 20:40:19 mail postfix/smtp[5729]: 1F52775403E: to=<satimis@yahoo.com>, relay=mail.netvigator.com[218.102.23.140], delay=42, status=bounced (host mail.netvigator.com[218.102.23.140] said: 554 Emails sent by non-NETVIGATOR domains cannot be processed. Please visit http://cs.netvigator.com/smtp (English) / http://cs.netvigator.com/smtpc (Chinese) for details (in reply to end of DATA command))
Dec 7 20:40:19 mail postfix/cleanup[5726]: 21CAD75404A: message-id=<20061207124019.21CAD75404A@mail.satimis.freeddns.com>Dec 7 20:40:19 mail postfix/qmgr[5631]: 21CAD75404A: from=<>, size=2661, nrcpt=1 (queue active)
Dec 7 20:40:19 mail postfix/qmgr[5631]: 1F52775403E: removed
Dec 7 20:40:20 mail postfix/smtp[5729]: 21CAD75404A: to=<satimis@satimis.freeddns.com>, relay=mail.netvigator.com[218.102.23.141], delay=1, status=bounced (host mail.netvigator.com[218.102.23.141] said: 550 relaying mail to satimis.freeddns.com is not allowed (in reply to RCPT TO command))
Dec 7 20:40:20 mail postfix/qmgr[5631]: 21CAD75404A: removed
Dec 7 20:41:56 mail postfix/scache[5730]: statistics: start interval Dec 7 20:38:30
Dec 7 20:41:56 mail postfix/scache[5730]: statistics: domain lookup hits=0 miss=6 success=0%
Dec 7 20:41:56 mail postfix/scache[5730]: statistics: address lookup hits=0 miss=24 success=0%
Dec 7 20:41:56 mail postfix/scache[5730]: statistics: max simultaneous domains=1 addresses=2 connection=3
Dec 7 20:43:12 mail postfix/smtpd[5732]: disconnect from localhost.satimis.freeddns.com[127.0.0.1]
Mail never arrived.
Quote:
Please try to create the script below and execute after you have dialed through PPPoE to restore your original
/etc/resolv.conf in order to restore the line 'lookup file bind' and to prevent resolution problem. It might
be that everytime you redialed, it replaces your resolv.conf since your are dynamic. Or figure out in your
distro on how to disable automatic DNS discovery. To give you an idea in OpenBSD's ppp.conf there is a
line used for PPPoE that says 'enable dns' and I'm just commenting this out and that will prevent on replacing my
resolv.conf. Find out its equivalent in Ubuntu.
On booting the server ADSL broadband will be automatically connected. I don't need to dial.
Sorry I'm not quite clear here. Whether you meant find the equivalent file of ppp.conf on Ubuntu?
If it removed the line 'lookup file bind'you needed that script just for restoring that line that might be
be due to overriding resolv.conf when you're connecting since your are dynamic. If that line in subject is
there, well no more need for that script. Hope that I never confused you.
$ ping mail.satimis.freeddns.com
If it replies, that's it.
Here is your error log that I've chunked for readability:
to=<satimis@yahoo.com>, relay=mail.netvigator.com[218.102.23.140], delay=42, status=bounced
(host mail.netvigator.com[218.102.23.140] said: 554 Emails sent by non-NETVIGATOR domains cannot
be processed.
Please visit http://cs.netvigator.com/smtp (English) http://cs.netvigator.com/smtpc (Chinese) for details (in reply to end of DATA command
You were not relayed and this shows that your settings are now okay and there is now issues relaying through
your ISP and it won't accept - bounces. You and your ISP has already reached DATA (message delivery) but was
ended/terminated as in "reply to end of DATA command" by reasoning with "554 Emails sent by
non-NETVIGATOR domains cannot be processed". This as I've observed, they won't allow relaying, maybe
unless you asked their permission to do so as strict measure on preventing spam relaying through their MTA
that might in a way blacklist them.
If it removed the line 'lookup file bind'you needed that script just for restoring that line that might be
be due to overriding resolv.conf when you're connecting since your are dynamic. If that line in subject is
there, well no more need for that script. Hope that I never confused you.
$ cat /etc/resolv.conf
Code:
lookup file bind
#search com
nameserver 208.67.222.222
nameserver 208.67.220.220
Quote:
$ ping mail.satimis.freeddns.com$ cat Maildir/new/1165709277.V803I347692M94738.mail.satimis.freeddns.com
Return-Path: <root@mail.satimis.freeddns.com>
X-Original-To: root
Delivered-To: satimis@mail.satimis.freeddns.com
Received: by mail.satimis.freeddns.com (Postfix, from userid 0)
id 051DC75404A; Sun, 10 Dec 2006 08:07:56 +0800 (HKT)
From: Anacron <root@mail.satimis.freeddns.com>
To: root@mail.satimis.freeddns.com
Subject: Anacron job 'cron.daily' on mail.satimis.freeddns.com
Message-Id: <20061210000757.051DC75404A@mail.satimis.freeddns.com>
Date: Sun, 10 Dec 2006 08:07:56 +0800 (HKT)
/etc/cron.daily/logrotate:
error: error running shared postrotate script for /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log
run-parts: /etc/cron.daily/logrotate exited with return code 1
If it replies, that's it.
$ sudo ping mail.satimis.freeddns.com
Code:
Password:
PING mail.satimis.freeddns.com (192.168.0.100) 56(84) bytes of data.
(it hung here awhile)
--- mail.satimis.freeddns.com ping statistics ---
32 packets transmitted, 0 received, 100% packet loss, time 31001ms
failed.
The Maildir was automatically created on /home/satimis/Maildir, I suppose during test:
$ ls -l Maildir/
Code:
total 12
drwx------ 2 satimis satimis 4096 2006-11-29 11:42 cur
drwx------ 2 satimis satimis 4096 2006-12-10 08:07 new
drwx------ 2 satimis satimis 4096 2006-12-10 08:07 tmp
$ ls -l Maildir/cur
total 0
$ ls -l Maildir/tmp/
total 0
lookup file bind
#search com
nameserver 208.67.222.222
nameserver 208.67.220.220
Your resolv.conf is now okay.
Are you pinging within your box? If so, why you can't ping within and your own?
Just 'ping mail' is already enough since that would be resolved through /etc/hosts.
Quote:
/etc/cron.daily/logrotate:
error: error running shared postrotate script for /var/log/mysql.log /var/log/mysql/mysql.log
/var/log/mysql/mysql-slow.log
run-parts: /etc/cron.daily/logrotate exited with return code 1
It seems it is looking for 'mysql.log' and have failed searching within those possible locations.
This is just for log rotation run daily within cron and I'm sure this is not critical. But
you should still work this out.
Return-Path: <root@mail.satimis.freeddns.com>
X-Original-To: root
Delivered-To: satimis@mail.satimis.freeddns.com
Received: by mail.satimis.freeddns.com (Postfix, from userid 0)
id 051DC75404A; Sun, 10 Dec 2006 08:07:56 +0800 (HKT)
From: Anacron <root@mail.satimis.freeddns.com>
To: root@mail.satimis.freeddns.com
Subject: Anacron job 'cron.daily' on mail.satimis.freeddns.com
Message-Id: <20061210000757.051DC75404A@mail.satimis.freeddns.com>
Date: Sun, 10 Dec 2006 08:07:56 +0800 (HKT)
/etc/cron.daily/logrotate:
error: error running shared postrotate script for /var/log/mysql.log
/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log
run-parts: /etc/cron.daily/logrotate exited with return code 1
This is a system generated error report sent through anacron/cron from root to your mail account
and will only stop once you resolved it. root@mail.satimis.freeddns.com is being sent
to your acount -> satimis@mail.satimis.freeddns.com as might be defined in your /etc/aliases.
Now I managed to having following result on /var/log/mail.log
$ tail -f /var/log/mail.log
Code:
Dec 11 12:15:59 mail postfix/smtp[6044]: warning: database /etc/postfix/sasl_passwd.db is older
than source file /etc/postfix/sasl_passwd
Dec 11 12:16:00 mail postfix/smtp[6044]: warning: ndsmtp.netvigator.com[219.76.95.44] offered
AUTH option multiple timesDec 11 12:16:00 mail postfix/smtp[6044]: 09D99754048:
to=<satimis@yahoo.com>, relay=ndsmtp.netvigator.com[219.76.95.44], delay=55, status=bounced
(host ndsmtp.netvigator.com[219.76.95.44] said: 530 authentication required for mail submission
(in reply to MAIL FROM command))
Dec 11 12:16:00 mail postfix/cleanup[6040]: 7486975404C:
message-id=<20061211041600.7486975404C@mail.satimis.freeddns.com>
Dec 11 12:16:00 mail postfix/qmgr[5317]: 7486975404C: from=<>, size=2387, nrcpt=1 (queue active)
Dec 11 12:16:00 mail postfix/qmgr[5317]: 09D99754048: removed
Dec 11 12:16:00 mail postfix/smtp[6044]: warning: ndsmtp.netvigator.com[219.76.95.3] offered
AUTH option multiple times
Dec 11 12:16:00 mail postfix/smtp[6044]: 7486975404C: to=<satimis@satimis.freeddn.com>,
relay=ndsmtp.netvigator.com[219.76.95.3], delay=0, status=bounced (host
ndsmtp.netvigator.com[219.76.95.3] said: 530 authentication required for mail submission (in
reply to MAIL FROM command))
Dec 11 12:16:00 mail postfix/qmgr[5317]: 7486975404C: removed
Dec 11 12:16:48 mail postfix/smtpd[5908]: disconnect from localhost.satimis.freeddns.com[127.0.0.1]
ISP asking for authentication to forward the mail instead of to reject.
$ cat /etc/postfix/main.cf
Code:
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mail.satimis.freeddns.com
mydomain = satimis.freeddns.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
#mydestination = /etc/postfix/local-host-names
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
#relayhost = satimis.homelinux.com
relayhost = [ndsmtp.netvigator.com]
mynetworks = 127.0.0.0/8, 192.168.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
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
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_tls_note_starttls_offer = yes
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
mailbox_command =
home_mailbox = Maildir/
virtual_maps = hash:/etc/postfix/virtusertable
/etc/postfix/sasl_passwd seems did not work.
$ cat /etc/postfix/sasl_passwd
Code:
[ndsmtp.netvigator.com] login:password
How to solve this problem?
Shall I add "smtp_auth = password" on /etc/postfix/main.cf ? Then there will be 2/double authentications?
Are you pinging within your box? If so, why you can't ping within and your own?
Just 'ping mail' is already enough since that would be resolved through /etc/hosts.
Yes, I can ping ISP mail server on this server.
$ sudo ping -c 3 ndsmtp.netvigator.com
Code:
Password:
PING ndsmtp.netvigator.com (219.76.95.3) 56(84) bytes of data.
64 bytes from wcppop01.netvigator.com (219.76.95.3): icmp_seq=1 ttl=252 time=16.9 ms
64 bytes from wcppop01.netvigator.com (219.76.95.3): icmp_seq=2 ttl=252 time=17.2 ms
64 bytes from wcppop01.netvigator.com (219.76.95.3): icmp_seq=3 ttl=252 time=17.6 ms
--- ndsmtp.netvigator.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2013ms
rtt min/avg/max/mdev = 16.962/17.281/17.677/0.296 ms
ISP mail server should be "ndsmtp.netvigator.com" NOT "mail.netvigator.com"
Quote:
It seems it is looking for 'mysql.log'.....
Yes, it is for mysql.log. I haven't completely configured mysql yet.
Dec 11 12:15:59 mail postfix/smtp[6044]: warning: database /etc/postfix/sasl_passwd.db is older
than source file /etc/postfix/sasl_passwd
If you modified sasl_passwd you will need to rerun 'sudo postmap /etc/postfix/sasl_passwd to have it updated
and need to reload postfix.
Quote:
How to solve this problem?
Shall I add "smtp_auth = password" on /etc/postfix/main.cf ? Then there will be 2/double authentications?
Your relay is asking you to authenticate and I'm sure you need to talk to your ISP about this.
The link below is the same with what Chort has already taught you couples of days ago.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.