Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mail aliases not working... *FIXED*
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Sep 28, 2003 11:17 pm    Post subject: mail aliases not working... *FIXED* Reply with quote

Hi,

I am using postfix as my MTA.

I am using linux accounts and have numerous aliases for each user, but they don't seem to be working.

here is my aliases file:
Quote:
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: chris

# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root

# Well-known aliases -- these should be filled in!
root: chris

# operator:

# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: root
www: webmaster

# trap decode to catch security attacks
# decode: /dev/null
timandsam: tim
samandtim: tim
anitaandjohn: john
johnandanita: john
samantha: tim
sammie: tim
sam: tim
timmy: tim
timbo: tim
ace: tim
timothy: tim
chrissy: chris
kathryn: katie
kt: katie


When I send am email to "timandsam" for example, the email never arrives, and I also do not get a returned mail error.

the log for mail shows:
Quote:
Sep 28 22:56:41 [postfix/smtpd] maps_find: recipient_canonical_maps: timandsam@smartclan.com: not found


I have tried stopping and starting postfix, as well as running "newaliases".

If I make a DOUBLE entry in newaliases and then run "newaliases" it complains - so it is definately reading the /etc/mail/aliases file.

I am stuck!

Can anyone offer advice?

Cheers,

Chris
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!


Last edited by taskara on Mon Sep 29, 2003 1:05 am; edited 1 time in total
Back to top
View user's profile Send private message
BenjyD_UK
n00b
n00b


Joined: 03 Sep 2003
Posts: 44

PostPosted: Sun Sep 28, 2003 11:55 pm    Post subject: postalias Reply with quote

Did you run postalias -
Code:
postalias /etc/mail/alias
on the alias file? I think newalias does this, although I've never used it. Do you have the aliases correctly specified in you main.cf file? My entry in main.cf looks like this:

Code:
alias_maps = hash:/etc/mail/aliases
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Sep 28, 2003 11:59 pm    Post subject: Reply with quote

hey, thanks for your reply!

here is my main.cf
Quote:
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
alias_maps = hash:/etc/mail/aliases


and I have run
Code:
postalias /etc/mail/alias
as per your suggestion - I'll give it a go now and see if it helps, but as you mentioned, I'm sure newaliases does this already.

brb to post result.. ta!
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Sep 29, 2003 12:03 am    Post subject: Reply with quote

hmm.. didn't seem to work :(

any other suggestions?

mail works fine - I can email people directly it's just the aliases... I can't think why...
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Sep 29, 2003 1:05 am    Post subject: Reply with quote

looks like I may have fixed the problem.

I needed to specify the whole address, instead of the username

this is the new look of my aliases file
Quote:
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: chris@smartclan.com

# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root

# Well-known aliases -- these should be filled in!
root: chris@smartclan.com

# operator:

# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: chris@smartclan.com
www: chris@smartclan.com

# trap decode to catch security attacks
# decode: /dev/null
timandsam: tim@smartclan.com
samandtim: tim@smartclan.com
anitaandjohn: john@smartclan.com
johnandanita: john@smartclan.com
samantha: tim@smartclan.com
sammie: tim@smartclan.com
sam: tim@smartclan.com
timmy: tim@smartclan.com
timbo: tim@smartclan.com
ace: tim@smartclan.com
timothy: tim@smartclan.com
chrissy: chris@smartclan.com
kathryn: katie@smartclan.com
kt: katie@smartclan.com
anita: john@smartclan.com


this seems to make everything work.

I was thrown off by the defaults in the middle like
Quote:
news: usenet
noc: root
security: root
:(

anyway the log file gave it away - it said it couldn't find user "tim" at some stage, which prompted me to try the full address.

cheers
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum