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.
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 ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
$ sudo iptables -F
$ telnet localhost 25
Code:
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 ubuntu.xyz.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-ubuntu.xyz.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: rootlocalhost
250 2.1.0 Ok
rcpt to: fmaster@localhost
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: My fist mail on Postfix
Hi
This is the 1st mail
Admin
.
250 2.0.0 Ok: queued as 7B2DDDF0168
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ su - fmaster
Password:
$ mail
Code:
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/fmaster": 1 message 1 new
>N 1 rootlocalhost@ubu Sun Oct 28 19:17 20/601
& Interrupt
& quit
Held 1 message in /var/mail/fmaster
You have mail in /var/mail/fmaster
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 ubuntu.xyz.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-ubuntu.xyz.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: root@localhost
250 2.1.0 Ok
rcpt to: fmaster@localhost
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: My first mail on Postfix
Hi,
Are you there?
Admin
.
250 2.0.0 Ok: queued as 2BA4CDF0168
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ su - fmaster
Code:
Password:
$ mail
No mail for fmaster
$ sudo tail /var/log/mail.log
Code:
Oct 30 16:51:02 ubuntu postfix/qmgr[5630]: 37B38DF01A4: removed
Oct 30 16:58:06 ubuntu postfix/master[5626]: terminating on signal 15
Oct 30 16:58:07 ubuntu postfix/master[5920]: daemon started -- version 2.3.8, configuration /etc/postfix
Oct 30 16:59:40 ubuntu postfix/smtpd[5929]: connect from localhost.localdomain[127.0.0.1]
Oct 30 17:00:33 ubuntu postfix/smtpd[5929]: 2BA4CDF0168: client=localhost.localdomain[127.0.0.1]
Oct 30 17:01:31 ubuntu postfix/cleanup[5934]: 2BA4CDF0168: message-id=<20071031000033.2BA4CDF0168@ubuntu.xyz.com>
Oct 30 17:01:31 ubuntu postfix/qmgr[5924]: 2BA4CDF0168: from=<root@localhost>, size=412, nrcpt=1 (queue active)
Oct 30 17:01:31 ubuntu postfix/local[5935]: 2BA4CDF0168: to=<fmaster@localhost>, relay=local, delay=81, delays=81/0.0
1/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Oct 30 17:01:31 ubuntu postfix/qmgr[5924]: 2BA4CDF0168: removed
Oct 30 17:01:34 ubuntu postfix/smtpd[5929]: disconnect from localhost.localdomain[127.0.0.1]
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
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
Thanks for your advice.
Strangely the mail has been received. "$ mail" provided an incorrect message.
$ su - fmaster
Password:
$ ls /home/fmaster/Maildir/
Code:
cur new tmp
$ ls -l /home/fmaster/Maildir/tmp/
total 0
$ ls -l /home/fmaster/Maildir/cur/
total 0
$ ls /home/fmaster/Maildir/new/
1193788891.Vfe00Iba800eM543528.ubuntu
Return-Path: <root@localhost>
X-Original-To: fmaster@localhost
Delivered-To: fmaster@localhost
Received: from localhost (localhost.localdomain [127.0.0.1])
by ubuntu.xyz.com (Postfix) with ESMTP id 2BA4CDF0168
for <fmaster@localhost>; Tue, 30 Oct 2007 17:00:10 -0700 (PDT)
Subject: My first mail on Postfix
Message-Id: <20071031000033.2BA4CDF0168@ubuntu.xyz.com>
Date: Tue, 30 Oct 2007 17:00:10 -0700 (PDT)
From: root@localhost
To: undisclosed-recipients:;
Hi,
Are you there?
Admin
It is the mail sent.
$ ls -l /var/mail/
Code:
total 4
-rw-rw---- 1 satimis mail 630 2007-10-29 01:40 satimis
fmaster is NOT there.
$ cat /var/mail/satimis
Code:
From fmaster@ubuntu.xyz.com Mon Oct 29 01:40:18 2007
Return-Path: <fmaster@ubuntu.xyz.com>
X-Original-To: root
Delivered-To: root@ubuntu.xyz.com
Received: by ubuntu.xyz.com (Postfix, from userid 1001)
id 4B774DF019F; Mon, 29 Oct 2007 01:40:18 -0700 (PDT)
To: root@ubuntu.xyz.com
From: fmaster@ubuntu.xyz.com
Subject: *** SECURITY information for ubuntu ***
Message-Id: <20071029084018.4B774DF019F@ubuntu.xyz.com>
Date: Mon, 29 Oct 2007 01:40:18 -0700 (PDT)
ubuntu : Oct 29 01:40:18 : fmaster : user NOT in sudoers ; TTY=pts/0 ; PWD=/home/fmaster ; USER=root ; COMMAND=/usr/bin/find / -name Maildir
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
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)
Yes.
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:
have a look at /etc/aliases to see what's aliased where
$ cat /etc/aliases
Code:
# Added by installer for initial user
root: satimis
Shall I add "fmaster and administrator" manually on this file?
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
From: MAILER-DAEMON@smtp16-01.prod.mesa1.secureserver.net
To: satimis@yahoo.com
Subject: failure notice
- snip -
<satimis@xyz.com>:
child status 100...The e-mail message could not be delivered because
there are no users here by that name.
--- Below this line is a copy of the message.
Return-Path: <satimis@yahoo.com>
Received: (qmail 28683 invoked from network); 31 Oct 2007 04:22:28
-0000
Received: from unknown (HELO p3presmtp01-10.prod.phx3.secureserver.net)
([208.109.80.159])
(envelope-sender <satimis@yahoo.com>)
by smtp16-01.prod.mesa1.secureserver.net (qmail-1.03) with
SMTP
for <satimis@xyz.com>; 31 Oct 2007 04:22:28 -0000
Received: (qmail 9701 invoked from network); 31 Oct 2007 04:22:28 -0000
Received: from web35215.mail.mud.yahoo.com ([66.163.179.94])
(envelope-sender <satimis@yahoo.com>)
by p3presmtp01-10.prod.phx3.secureserver.net
(qmail-ldap-1.03) with SMTP
for <satimis@xyz.com>; 31 Oct 2007 04:22:28 -0000
Received: (qmail 59025 invoked by uid 60001); 31 Oct 2007 04:22:27
-0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
b=2jirx/pK30aj3lmN18lb9UHCvnJGalAru35PVbsFAHqFy+SIbmmQ6QnXW/ZpwfQ+eSOWxjCsmQzuurmYhn45jLsVas7lBPBNfQQlAko8HrqR8onkLXmJYXaAqbucrzBsaO/dioY3Jp89M/tKDJzY241qs5znAyopkGZydTviB24=;
X-YMail-OSG:
Hd1doBwVM1ngBf5xtoC7sHJGIOOGmE3QqklcjHipIPuhGePMxO.dGz.fLwy7zK0eXLHoyw8YnlldCwwdSFQwp.B03zvhH04gJ2b7IRIrBhIIahIE.FpbKHcIeMVehg--
Received: from [220.232.213.178] by web35215.mail.mud.yahoo.com via
HTTP; Wed, 31 Oct 2007 12:22:27 CST
Date: Wed, 31 Oct 2007 12:22:27 +0800 (CST)
From: Stephen Liu <satimis@yahoo.com>
Subject: Test_20071031
To: satimis@xyz.com
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <518118.58847.qm@web35215.mail.mud.yahoo.com>
Test_20071031
Also tried on gmail.com meeting the same problem, mail returned.
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
Yes, fmaster is an user.
Edit /etc/aliases
as follow;
$ cat /etc/aliases
Code:
# Added by installer for initial user
root: satimis, fmaster, administrator
$ sudo postalias /etc/aliases
Code:
sudo: timestamp too far in the future: Oct 31 15:31:26 2007
Password:
satimis@ubuntu:~
Remark:
Code:
I don't know how this happened;
sudo: timestamp too far in the future: Oct 31 15:31:26 2007
The clock immediately changed from current time to;
0:10 Wed 31 Oct 2007
date did not changes
Send a webmail to satimis, fmaster and administration simultaneously (same mail to 3 recepients). All returned immediately.
Code:
- snip -
Subject: failure notice
We're sorry. There's a problem with the e-mail address(es) you're
trying
to send to. Please verify the address(es) and try again. If you
continue
to have problems, please contact Customer Support at (480) 624-2500.
<satimis@xyz.com>:
child status 100...The e-mail message could not be delivered because
there are no users here by that name.
--- Below this line is a copy of the message.
Return-Path: <satimis@yahoo.com>
Received: (qmail 1800 invoked from network); 31 Oct 2007 07:40:07 -0000
Received: from unknown (HELO p3presmtp01-04.prod.phx3.secureserver.net)
([208.109.80.153])
(envelope-sender <satimis@yahoo.com>)
by smtp06-01.prod.mesa1.secureserver.net (qmail-1.03) with
SMTP
for <satimis@xyz.com>; 31 Oct 2007 07:40:07 -0000
Received: (qmail 21324 invoked from network); 31 Oct 2007 07:40:07
-0000
Received: from web35202.mail.mud.yahoo.com ([66.163.179.81])
(envelope-sender <satimis@yahoo.com>)
by p3presmtp01-04.prod.phx3.secureserver.net
(qmail-ldap-1.03) with SMTP
for <satimis@xyz.com>; 31 Oct 2007 07:40:07 -0000
Received: (qmail 42205 invoked by uid 60001); 31 Oct 2007 07:40:02
-0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
b=ZW28Hz2jf45IcN3xSK2OboW3dPXkFI8NljTkalOVAefOA4XnvQPhAQ7VMZohZI+s56N+IIis8oB9lUQq9b4fIHCiUWnHbxXunVO6Bnm+4RgwB8R7858NFva/DxqPmKWfciP7q3Go5IwxuYNSJFYRyKR+lM0i8xaTowCNg+MF6Rs=;
X-YMail-OSG:
uyckHwMVM1koqap8LYNkisKdpczNX_T7zDySZsNsF9uuHt3HSJ4cizSh52OGkAmidYa62b4GviU7m.b2tEmyZYSG8Njiybr4wgMaMppO2yTFy3DUE0kmLvi_SdGsZg--
Received: from [220.232.213.178] by web35202.mail.mud.yahoo.com via
HTTP; Wed, 31 Oct 2007 15:40:01 CST
Date: Wed, 31 Oct 2007 15:40:01 +0800 (CST)
From: Stephen Liu <satimis@yahoo.com>
Subject: Test_20071031
To: satimis@xyz.com, fmaster@xyz.com, administrator@xyz.com
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <762883.41901.qm@web35202.mail.mud.yahoo.com>
Test_20071031
Return-Path: <satimis@ubuntu.xyz.com>
X-Original-To: root
Delivered-To: root@ubuntu.xyz.com
Received: by ubuntu.xyz.com (Postfix, from userid 1000)
id 086CFDF01A6; Wed, 31 Oct 2007 00:29:36 -0700 (PDT)
To: root@ubuntu.xyz.com
From: satimis@ubuntu.xyz.com
Subject: *** SECURITY information for ubuntu ***
Message-Id: <20071031072937.086CFDF01A6@ubuntu.xyz.com>
Date: Wed, 31 Oct 2007 00:29:36 -0700 (PDT)
ubuntu : Oct 31 00:29:36 : satimis : timestamp too far in the future: Oct 31 15:31:26 2007 ; TTY=pts/0 ; PWD=/home/satimis ; USER=root ; COMMAND=/usr/sbin/postalias /etc/aliases
It is only a notice on time.
$ sudo tail /var/log/mail.log
Code:
Password:
Oct 31 13:17:07 ubuntu postfix/master[4881]: terminating on signal 15
Oct 31 15:28:22 ubuntu authdaemond: modules="authpam", daemons=5
Oct 31 15:28:22 ubuntu authdaemond: Installing libauthpam
Oct 31 15:28:22 ubuntu authdaemond: Installation complete: authpam
Oct 31 15:28:25 ubuntu postfix/master[4915]: daemon started -- version 2.3.8, configuration /etc/postfix
Oct 31 00:29:37 ubuntu postfix/pickup[4919]: 086CFDF01A6: uid=1000 from=<satimis>
Oct 31 00:29:37 ubuntu postfix/cleanup[5406]: 086CFDF01A6: message-id=<20071031072937.086CFDF01A6@ubuntu.xyz.com>
Oct 31 00:29:37 ubuntu postfix/qmgr[4920]: 086CFDF01A6: from=<satimis@ubuntu.xyz.com>, size=520, nrcpt=1 (queue active)
Oct 31 00:29:37 ubuntu postfix/local[5408]: 086CFDF01A6: to=<satimis@ubuntu.xyz.com>, orig_to=<root>, relay=local, delay=0.29, delays=0.11/0.14/0/0.04, dsn=2.0.0, status=sent (delivered to maildir)
Oct 31 00:29:37 ubuntu postfix/qmgr[4920]: 086CFDF01A6: removed
Seems nothing in connection with incoming mail.
No warning message on time received by fmaster and administrator.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.