Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th August 2007, 00:38
vestport vestport is offline
Member
 
Join Date: Aug 2007
Posts: 65
Thanks: 8
Thanked 1 Time in 1 Post
Cool Sendmail w/Dovecot Centos 5 All inbound mail goes to root only and not to users

Hello,

I have setup a centos 5 server w/sendmail and dovecot. For now I am simply trying to get email working with the command line "mail" program. My MX records are setup as well as reverse lookups on DNS servers. I can send outbound mail fine. The problem is that any inbound mail only goes to the "root" account no matter who the intended recipient is. Even mail on localhost is not working correctly. user@localhost can email roo@localhost fine but email from root@localhost to user@localhost never gets through and ends up in the root mail folder. In short all received emails locally or from the net go to the root account and not to the users that they are addressed to. Outbound emails from regular users are addressed correctly.

I will add that normal users accounts do not appear to have a "Mailbox" of any kind in their home directory. I just don't know what I am missing here. Do I need a .procmailrc or .mailrc in the users directory or an /etc/procmailrc or something?

I have setup sendmail in the past but I admit it was some time ago and I am a bit rusty. Also, security and configuration issues have surely changed since I set a mail server up last. Any help is greatly appreciated.


My domain is psfleasing.com, server is mail.psfleasing.com. Here is a printout of my /var/log/maillog with root trying to email a user account "www@localhost" on the mail.psfleasing.com server.


I do a "mail www@localhost" from the # command line and below is what I see in the maillog.

Aug 14 17:26:13 mail sendmail[7068]: l7ELQDRj007068: from=root, size=38, class=0, nrcpts=1, msgid=<200708142126.l7ELQDRj007068@mail.psfleasing .com>, relay=root@localhost
Aug 14 17:26:13 mail sendmail[7069]: l7ELQDak007069: from=<root@mail.psfleasing.com>, size=335, class=0, nrcpts=1, msgid=<200708142126.l7ELQDRj007068@mail.psfleasing .com>, proto=ESMTP, daemon=MTA-v6, relay=localhost.localdomain [127.0.0.1]
Aug 14 17:26:13 mail sendmail[7068]: l7ELQDRj007068: to=www@localhost, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30038, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l7ELQDak007069 Message accepted for delivery)
Aug 14 17:26:13 mail sendmail[7070]: l7ELQDak007069: to=root, ctladdr=<root@mail.psfleasing.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30565, dsn=2.0.0, stat=Sent


It says it sent but is not there if I login to my "www" user account.


The user mailbox is not setup correctly and I don't really know where to start.


Thanks


Art
Reply With Quote
Sponsored Links
  #2  
Old 15th August 2007, 20:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

What's in /etc/aliases?

Quote:
I will add that normal users accounts do not appear to have a "Mailbox" of any kind in their home directory. I just don't know what I am missing here. Do I need a .procmailrc or .mailrc in the users directory or an /etc/procmailrc or something?
The mboxes are in /var/spoll/mail; if you use Maildir instead, the Maildirs are created in the users' home directories.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 16th August 2007, 04:21
vestport vestport is offline
Member
 
Join Date: Aug 2007
Posts: 65
Thanks: 8
Thanked 1 Time in 1 Post
Post My /etc/aliases

# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root

# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root

ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root

newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster


# trap decode to catch security attacks
decode: root

# Person who should get root's mail
#root: marc
Reply With Quote
  #4  
Old 16th August 2007, 04:25
vestport vestport is offline
Member
 
Join Date: Aug 2007
Posts: 65
Thanks: 8
Thanked 1 Time in 1 Post
Smile Mailbox locations

Mailboxes are in /var/spool/mail.

Only root has data. User mailbox for user "www" is created but empty even though I have tried to mail this user many times.


Thanks for having a look at this Falko!


Art
Reply With Quote
  #5  
Old 16th August 2007, 05:38
vestport vestport is offline
Member
 
Join Date: Aug 2007
Posts: 65
Thanks: 8
Thanked 1 Time in 1 Post
Talking Mail problem partially resolved

Hello Falko, I see in checking the /etc/aliases file there is a reserved user "www" for httpd. Duhhhhh, foolishly I chose this username for one of my user accounts and this obviously explains most of the failures.

I have another user "art" that indeed has mail in "Maildir" however just typing "mail" at the "$" prompt says:

No mail for art
[art@mail ~]$

when there is in fact mail there.

If I cat the actual messages in the Maildir they are indeed there. I guess I just cant use "www" for a user name . With that solved how can I get "mail" to show me messages for user "art" ?

Right now it says:


No mail for art
[art@mail ~]$

when there are actually messages there.

Sorry as I said I am a bit rusty and foolishly selected a reserved user as a username initially.


With that said and where I am at this point how do I get the "mail" program to actually show me the messages? Is this where I need .mailrc I assume? If so what do I include in my .mailrc?


Just installed "pine" so life is good and the basic problem is solved. I'm still curious why "mail" still shows "No mail for art".


Thanks Falko! Just the check on /etc/aliases got me going in the right direction here.


Art
Reply With Quote
  #6  
Old 17th August 2007, 17:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
 
Default

I've never used mail for checking emails. I think you're better of with a real email client.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.