Postfix - send mail problem
Hi folks,
Ubuntu 7.04 server amd64 Just finished installing the mail server and encountered problem on testing it. Steps performed as follows; $ sudo useradd -m -s /bin/bash fmaster $ sudo passwd fmaster Code:
Enter new UNIX password: Code:
Trying 127.0.0.1... satimis |
post the output of postconf -n
Also, test again, and then look at the end of /var/log/mail.log, which may contain clues. |
Quote:
Code:
Password: $ tail /var/log/mail.log Code:
Oct 28 09:58:26 ubuntu postfix/smtpd[5839]: connect from localhost.localdomain[127.0.0.1] B.R. satimis |
Oct 28 09:59:27 ubuntu postfix/smtpd[5839]: warning: unknown smtpd restriction: "permit_eth0"
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_eth0,reject_unauth_destination There's the problem. |
Solved
Quote:
Problem solved as follows; Edit /etc/postfix/main.cf Changing "permit_eth0" to "permit_mynetworks" $ sudo /etc/init.d/postfix restart Code:
* Stopping Postfix Mail Transport Agent postfix [ OK ] $ sudo iptables -F $ telnet localhost 25 Code:
Trying 127.0.0.1... $ su - fmaster Password: Code:
Mail version 8.1.2 01/15/2001. Type ? for help. found the mail B.R. satimis |
No mail found after sent
Hi AlucardZero,
What is the reason if changing Code:
mailbox_command = procmail -a "$EXTENSION" Code:
mailbox_command = ============= Test performed as follows; After change made $ sudo /etc/init.d/postfix restart Code:
* Stopping Postfix Mail Transport Agent postfix [ OK ] $ sudo postconf -n Code:
Password: $ telnet localhost 25 Code:
Trying 127.0.0.1... $ su - fmaster Code:
Password: $ sudo tail /var/log/mail.log Code:
Oct 30 16:51:02 ubuntu postfix/qmgr[5630]: 37B38DF01A4: removed Where is the mail sent? Thanks B.R. satimis |
I'd suggest you look in /home/user_name/Maildir, since this is what you've set home_mailbox to. I assume that your procmail script sent the messages /var/mail/user_name
|
Quote:
Strangely the mail has been received. "$ mail" provided an incorrect message. $ su - fmaster Password: $ ls /home/fmaster/Maildir/ Code:
cur new tmp total 0 $ ls -l /home/fmaster/Maildir/cur/ total 0 $ ls /home/fmaster/Maildir/new/ 1193788891.Vfe00Iba800eM543528.ubuntu $ cat /home/fmaster/Maildir/new/1193788891.Vfe00Iba800eM543528.ubuntu Code:
Return-Path: <root@localhost> $ ls -l /var/mail/ Code:
total 4 $ cat /var/mail/satimis Code:
From fmaster@ubuntu.xyz.com Mon Oct 29 01:40:18 2007 Just sent following webmail on yahoo.com satimis@xyz.com administrator@xyz.com Both returned immediately. Users NOT found. fmaster@xyz.com root@xyz.com Both NOT rejected. But can't find the mails on respective Maildir/new Where shall I check? Both "ping xyz.com/ubuntu.xyz.com" work. TIA B.R. satimis |
Look at your logs
Are satimis and administrator valid linux users or are they aliased to valid users? Did you create the relevant directories for them (Maildir/new, etc) The message you say wasn't sent looks like a system generated mail, sent to root which I guess is aliased to fmaster. have a look at /etc/aliases to see what's aliased where |
Quote:
It took me hours of working to find out this funny trick. On running; $ sudo useradd -m -s /bin/bash username It creates an user A/C together with home directory but W/O Maildir. After sending a mail to this user on the same PC, Intranet, Maildir including subdirectories, cur,new,tmp, will be created automatically with the arriving mail delivered on /Maildir/new/ directory. Quote:
Code:
# Added by installer for initial user I'll NOT create Maildir for root because I won't make root receiving mails. Thanks Edit: Just sent a webmail to "satimis" on yahoo.com and met with failure Code:
Date: 31 Oct 2007 04:22:28 -0000 B.R. satimis |
As I said, look at you logs (on your server, not the return message to gmail)
You can add other aliases to aliases, but isn't fmaster a user? Once you add them, don't forget to run postalias /etc/aliases |
Quote:
Edit /etc/aliases as follow; $ cat /etc/aliases Code:
# Added by installer for initial user Code:
sudo: timestamp too far in the future: Oct 31 15:31:26 2007 Remark: Code:
I don't know how this happened; Send a webmail to satimis, fmaster and administration simultaneously (same mail to 3 recepients). All returned immediately. Code:
- snip - $ ls /home/satimis/Maildir/new/ Code:
1193787380.Vfe00Iba8013M559175.ubuntu 1193815777.Vfe00Iba801fM231759.ubuntu $ cat Maildir/new/1193815777.Vfe00Iba801fM231759.ubuntu Code:
Return-Path: <satimis@ubuntu.xyz.com> $ sudo tail /var/log/mail.log Code:
No warning message on time received by fmaster and administrator. B.R. satimis |
I'd guess something has gone wrong at the postalias stage since you had an error there
|
Quote:
$ sudo -k $ sudo date -s "10/31/2007 17:30:00" Code:
Password: Code:
Password: $ cat /etc/aliases Code:
# Added by installer for initial user $ sudo newaliases No complaint $ sudo /etc/init.d/postfix restart Code:
* Stopping Postfix Mail Transport Agent postfix [ OK ] B.R. satimis |
But postalais /etc/aliases didn't work did it? This means postfix can't read the alias file
|
All times are GMT -5. The time now is 08:18 AM. |