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.
I encountered another problem after installing sendmail on the server which is to satisfy another package. Ubuntu does not allow 2 MTAs. Therefore on installing sendmail it removed postfix simultaneously which I was not aware.
Later I ran
# apt-get remove --purge sendmail
and
# apt-get install postfix.
and changed "satimis.freeddns.com" to "satimis.homelinux.com". The later is my current domain for this test.
But postfix can't work properly. I went through this thread and repeated all appropriate steps
# sudo postmap /etc/postfix/sasl_passwd
Code:
sudo: unable to lookup #mail.satimis.freeddns.com
satimis.homelinux.com via gethostbyname()
It is quite strange. It points to "mail.satimis.freeddns.com"
You changed your domain so you need to as well adjust /etc/hostname, myhostname and mydomain in main.cf.
Then it needs restarting your network.
Hi Gani,
Repeated following steps
$ cat /etc/hostname
Code:
satimis.homelinux.com
$ cat /etc/postfix/main.cf
Code:
# is /etc/mailname.
#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 = satimis.homelinux.com
mydomain = satimis.homelinux.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
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
$ sudo /etc/init.d/networking restart
Code:
sudo: unable to lookup #mail.satimis.freeddns.com
satimis.homelinux.com via gethostbyname()
* Reconfiguring network interfaces... Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:13:d4:fe:da:87
Sending on LPF/eth0/00:13:d4:fe:da:87
Sending on Socket/fallback
Plugin rp-pppoe.so loaded.
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:13:d4:fe:da:87
Sending on LPF/eth0/00:13:d4:fe:da:87
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping. [ ok ]
$ pon dsl-provider
Code:
Plugin rp-pppoe.so loaded.
$ su
Password:
# telnet localhost 25
Code:
Trying 127.0.0.1...
Connected to localhost.satimis.homelinux.com.
Escape character is '^]'.
ehlo satimis.homelinux.com
(it hangs here)
$ tail -f /var/log/mail.err
Code:
Dec 19 21:17:16 #mail postfix/cleanup[5895]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:18:17 #mail postfix/cleanup[5929]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:19:18 #mail postfix/cleanup[5931]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:20:19 #mail postfix/cleanup[5948]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:21:20 #mail postfix/cleanup[5997]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:22:21 #mail postfix/cleanup[6011]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:23:07 #mail postfix/smtpd[6027]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:23:22 #mail postfix/cleanup[6029]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:24:08 #mail postfix/smtpd[6031]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:24:23 #mail postfix/cleanup[6032]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
$ tail -f /var/log/mail.log
Code:
Dec 19 21:25:09 #mail postfix/smtpd[6062]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Dec 19 21:25:09 #mail postfix/smtpd[6062]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:25:10 #mail postfix/master[4961]: warning: process /usr/lib/postfix/smtpd pid 6062 exit status 1
Dec 19 21:25:10 #mail postfix/master[4961]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Dec 19 21:25:24 #mail postfix/cleanup[6063]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
Dec 19 21:25:25 #mail postfix/master[4961]: warning: process /usr/lib/postfix/cleanup pid 6063 exit status 1
Dec 19 21:25:25 #mail postfix/master[4961]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
Dec 19 21:25:29 #mail postfix/pickup[5666]: fatal: watchdog timeout
Dec 19 21:25:30 #mail postfix/master[4961]: warning: process /usr/lib/postfix/pickup pid 5666 exit status 1
Dec 19 21:25:30 #mail postfix/master[4961]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
sudo: unable to lookup #mail.satimis.freeddns.com
satimis.homelinux.com via gethostbyname()
Password:
$ sudo postmap /etc/postfix/virtusertable
Code:
sudo: unable to lookup #mail.satimis.freeddns.com
satimis.homelinux.com via gethostbyname()
postmap: fatal: open /etc/postfix/virtusertable: No such file or directory
$ ls /etc/postfix/ | grep virtusertable
No printout
Shall I create this file? What will be its content? What will be its use?
sudo: unable to lookup #mail.satimis.freeddns.com
satimis.homelinux.com via gethostbyname()
/etc/hosts:
Code:
127.0.0.1 localhost.satimis.homelinux.com localhost
192.168.0.x mail.satimis.homelinux.com mail
# no ubuntu
Also just making sure, 'sudo cp /etc/postfix/aliases /etc' then, 'sudo newaliases'.
Quote:
postmap: fatal: open /etc/postfix/virtusertable: No such file or directory
It's not present. If before it's there even you did not create it manually, it was then system-generated during package installation. Check it out. Or just for the sake of testing, comment out at the moment the line pertaining to this and just return to it later.
Quote:
shall I reverse their order?
nameserver 205.252.144.28
nameserver 218.102.23.77
lookup file bind
I think so.. It makes sure that it will first read /etc/hosts, then bind and then your ISP's nameservers. Just my idea.
/etc/mail/aliases
/etc/aliases
They are the same
Which file shall I copy? Tks.
No need.
Quote:
It is quite strange. I found its order rearranged together with new nameservers automatically. I just started the server.
This is the usual case when your dynamic. If still persistent, rearranged manually and save it to a different file name, say - /etc/resolv.proper. Then just copy it after boot up or create a script to be loaded by rc.local. I'm doing this in one of my as well strange OBSD installations.
Sorry if I lacked details. That's simply editting /etc/postfix/main.cf and uncommenting "virtual_maps = hash:/etc/postfix/virtusertable" and then reload postfix and no need to rerun postmap. That answered actually your previous question stating that in what part of your config lines it can be found.
That's simply editting /etc/postfix/main.cf and uncommenting "virtual_maps = hash:/etc/postfix/virtusertable" and then reload postfix and no need to rerun postmap.
Failed sending mail with following errors on "tail -f /var/log/mail.log"
Code:
....
said: 530 authentication required for mail submission (in reply to MAIL FROM command))
Dec 21 08:32:41 mail postfix/cleanup[6173]: 362F575404F: message-id=<20061221003241.362F575404F@satimis.homelinux.com>
Dec 21 08:32:41 mail postfix/qmgr[6119]: 362F575404F: from=<>, size=2346, nrcpt=1 (queue active)
Dec 21 08:32:41 mail postfix/local[6176]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
..
Re: "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled"
$ sudo postconf | grep nis:
Code:
alias_maps = hash:/etc/aliases, nis:mail.aliases
Added:-
Code:
alias_maps = hash:/etc/aliases
on /etc/postfix/main.cf
Re: "530 authentication required for mail submission"
Edited /etc/postfix/sasl_passwd
changing the line:
....
Dec 21 09:51:13 mail postfix/smtpd[6687]: cannot load Certificate Authority data
Dec 21 09:51:13 mail postfix/smtpd[6687]: warning: TLS library problem: 6687:error:02001002:system library:fopen:No such file or directory:bss_file.c:122:fopen('/etc/postfix/ssl/cacert.pem','r'):
Dec 21 09:51:13 mail postfix/smtpd[6687]: warning: TLS library problem: 6687:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:125:
Dec 21 09:51:13 mail postfix/smtpd[6687]: warning: TLS library problem: 6687:error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:by_file.c:274:
What are those warnings? How to get rid of them. It did not affect mail dispatched.
Edit:
Where will be the idea path for creating a email box for "satimis"?
No such file or directory:bss_file.c:122:fopen('/etc/postfix/ssl/cacert.pem','r'
That was your logs output. It seems cacert.pem is not present. You may uncomment in your main.cf the
lines using this file for the time being. This relates to TLS functionality that can be optional and if you
wish this added, you can search for several tutorials on this or simply read postfix documentation.
Where will be the idea path for creating a email box for "satimis"?
With Maildir/ style of mailbox, it will default to your home directory as /home/satimis/Maildir/.
If you want to have a central repo of all your users mails other than the default, say in
/var/mail/mydomain/satimis/Maildir/, you will need to use third party app like Courier-IMAP and
Maildrop to use an SQL backend like MySQL or Dovecot IMAP/POP3 server. There are several tutorials
on setting-up Courier and Maildrop in postfix's website.
That was your logs output. It seems cacert.pem is not present. You may uncomment in your main.cf the lines using this file for the time being.
Edited /etc/postfix/main.cf
$ cat /etc/postfix/main.cf | grep cacert.pem
Code:
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
Quote:
This relates to TLS functionality that can be optional and if you
wish this added, you can search for several tutorials on this or simply read postfix documentation.
$ sudo /etc/init.d/postfix restart
* Stopping Postfix Mail Transport Agent postfix [ ok ]
* Starting Postfix Mail Transport Agent postfix [ ok ]
[/code]
$ sudo telnet localhost 25
Code:
Trying 127.0.0.1...
etc.
A mail sent successfully.
$ tail -f /var/log/mail.log
Code:
Dec 21 22:00:27 mail postfix/master[4977]: terminating on signal 15
Dec 21 22:00:28 mail postfix/master[5769]: daemon started -- version 2.2.10, configuration /etc/postfix
Dec 21 22:00:40 mail postfix/smtpd[5775]: connect from localhost.satimis.homelinux.com[127.0.0.1]
Dec 21 22:02:02 mail postfix/smtpd[5775]: 28D0975404B: client=localhost.satimis.homelinux.com[127.0.0.1]
Dec 21 22:02:26 mail postfix/cleanup[5781]: 28D0975404B: message-id=<20061221140202.28D0975404B@satimis.homelinux.com>
Dec 21 22:02:26 mail postfix/qmgr[5771]: 28D0975404B: from=<satimis@satimis.homelinux.com>, size=423, nrcpt=1 (queue active)
Dec 21 22:02:27 mail postfix/smtp[5782]: warning: ndsmtp.netvigator.com[219.76.95.3] offered AUTH option multiple times
Dec 21 22:02:27 mail postfix/smtp[5782]: 28D0975404B: to=<satimis@yahoo.com>, relay=ndsmtp.netvigator.com[219.76.95.3], delay=44, status=sent (250 <458A5B8A00000CE2> Mail accepted)
Dec 21 22:02:27 mail postfix/qmgr[5771]: 28D0975404B: removed
Dec 21 22:02:45 mail postfix/smtpd[5775]: disconnect from localhost.satimis.homelinux.com[127.0.0.1]
Quote:
With Maildir/ style of mailbox, it will default to your home directory as /home/satimis/Maildir/.
Sent a mail "satimis@satimis.homelinux.com" on Yahoo.com but can't receive it.
$ ls /home/satimis/Maildir/
Code:
cur new tmp
$ ls Maildir/cur/
$ ls Maildir/tmp/
both without printout.
$ ls -al /var/mail/
Code:
total 20
drwxrwsr-t 2 root mail 4096 2006-12-14 18:12 .
drwxr-xr-x 17 root root 4096 2006-11-16 13:37 ..
-rw-rw---- 1 satimis mail 12000 2006-12-16 08:31 satimis
It is not the mail sent on Yahoo.com website.
Where is the mail gone? It was not rejected.
Quote:
If you want to have a central repo of all your users mails other than the default, say in
/var/mail/mydomain/satimis/Maildir/, you will need to use third party app like Courier-IMAP and
Maildrop to use an SQL backend like MySQL or Dovecot IMAP/POP3 server. There are several tutorials
on setting-up Courier and Maildrop in postfix's website.
Edit:
There is something unexpected happened after playing around with the config file of postfix. Now "satimis.homelinux.com" and "satimis.homelinux.com:8080" failed browsing the homepage on another network. Previous "satimis.homelinux.com:8080" worked without problem. Ping is still possible;
$ sudo ping -c 3 satimis.homelinux.com
Password:
Code:
PING satimis.homelinux.com (219.78.151.207) 56(84) bytes of data.
64 bytes from n219078151207.netvigator.com (219.78.151.207): icmp_seq=1 ttl=125 time=36.2 ms
64 bytes from n219078151207.netvigator.com (219.78.151.207): icmp_seq=2 ttl=125 time=35.1 ms
64 bytes from n219078151207.netvigator.com (219.78.151.207): icmp_seq=3 ttl=125 time=33.8 ms
--- satimis.homelinux.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2015ms
rtt min/avg/max/mdev = 33.801/35.039/36.212/0.997 ms
There is something unexpected happened after playing around with the config file of postfix. Now "satimis.homelinux.com" and "satimis.homelinux.com:8080" failed browsing the homepage on another network. Previous "satimis.homelinux.com:8080" worked without problem. Ping is still possible;
We'll, smtp won't definitely affect http. It might just be coincidental when things went wrong with your http service. BTW, what's that particular config?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.