Alias/virtual confusion

This is a discussion on Alias/virtual confusion within the mailing.postfix.users forums, part of the Mail Servers and Related category; I'm a bit confused on aliases and virtual and delivery methods and would appreciate some clarification. I'll try ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-05-2006
AdminTom
 
Posts: n/a
Default Alias/virtual confusion

I'm a bit confused on aliases and virtual and delivery methods and
would appreciate some clarification. I'll try to keep it brief.

BTW, I'm using postfix 1.1.11. Yes, I realize I need to upgrade. I'll
get around to that at some point, but I want to better understand the
current system before I build a new one. Other possibly relevant info:
I've tied this postfix into an amavis/spamassassin/clamav combo.

I believe 'postconf -n' output is generally requested here...
---
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp:localhost:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
local_recipient_maps = hash:/etc/postfix/local_recipients, $alias_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.localdomain,
localhost.$mydomain, mail.$mydomain, /etc/postfix/local-domains
mydomain = SOMEDOMAIN.com
myhostname = SOMEDOMAIN.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
relay_domains = /etc/postfix/relay_domains
sample_directory = /usr/share/doc/postfix-1.1.11/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, check_client_access
hash:/etc/postfix/client_access, check_relay_domains
virtual_maps = hash:/etc/postfix/virtual
---
I've only changed the domain and hostname, and removed the tabs since
the google reader leaves them in.

For starters, it doesn't seem that the aliases file is parsed. If I
add an entry there, I can't receive mail. And I can't receive mail for
any of the entries there. This may be normal, since some of my reading
suggests that aliases is just used for local delivery, but I'm not sure
I get that right.

Anything I add to virtual will receive mail. As above, some reading
suggests to me that this is normal for virtual delivery, which implies
that's what I'm using. But the default method, if I'm not mistaken, is
local, and I don't see where it's been explicitly changed.

Now, if aliases isn't being parsed, then I would think removing
(commenting) the alias_maps and alias_database in main.cf shouldn't
cause any harm, but mail won't go through if I do that, and it doesn't
return a delivery failure.

The /etc/postfix/local_recipients is a map I set up when adding in the
amavis combo a few months ago to counter the problem of valid mails
being bounced as having invalid addresses. It may be part of my
problem, but I've not made it around to testing that out yet.

Also, I've taken the contents of aliases and added them (sans colons)
to virtual and can deliver messages to those names in that arrangement.

Essentially, I'm confused, as you can likely tell. Can you clarify why
my setup isn't behaving as I expect, or where I'm thinking incorrectly?
Thanks for your effort!

Reply With Quote
  #2 (permalink)  
Old 09-05-2006
Greg Hackney
 
Posts: n/a
Default Re: Alias/virtual confusion

AdminTom wrote:
> I'm a bit confused on aliases and virtual and delivery methods and
> would appreciate some clarification. I'll try to keep it brief.
>
> BTW, I'm using postfix 1.1.11. Yes, I realize I need to upgrade. I'll
> get around to that at some point, but I want to better understand the
> current system before I build a new one. Other possibly relevant info:
> I've tied this postfix into an amavis/spamassassin/clamav combo.
>
> I believe 'postconf -n' output is generally requested here...
> ---
> alias_database = hash:/etc/postfix/aliases
> alias_maps = hash:/etc/postfix/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> content_filter = smtp:localhost:10024
> daemon_directory = /usr/libexec/postfix
> debug_peer_level = 2
> local_recipient_maps = hash:/etc/postfix/local_recipients, $alias_maps
> mail_owner = postfix
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> mydestination = $myhostname, localhost.localdomain,
> localhost.$mydomain, mail.$mydomain, /etc/postfix/local-domains
> mydomain = SOMEDOMAIN.com
> myhostname = SOMEDOMAIN.com
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
> relay_domains = /etc/postfix/relay_domains
> sample_directory = /usr/share/doc/postfix-1.1.11/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtpd_recipient_restrictions = permit_mynetworks, check_client_access
> hash:/etc/postfix/client_access, check_relay_domains
> virtual_maps = hash:/etc/postfix/virtual
> ---
> I've only changed the domain and hostname, and removed the tabs since
> the google reader leaves them in.
>
> For starters, it doesn't seem that the aliases file is parsed. If I
> add an entry there, I can't receive mail. And I can't receive mail for
> any of the entries there. This may be normal, since some of my reading
> suggests that aliases is just used for local delivery, but I'm not sure
> I get that right.
>
> Anything I add to virtual will receive mail. As above, some reading
> suggests to me that this is normal for virtual delivery, which implies
> that's what I'm using. But the default method, if I'm not mistaken, is
> local, and I don't see where it's been explicitly changed.
>
> Now, if aliases isn't being parsed, then I would think removing
> (commenting) the alias_maps and alias_database in main.cf shouldn't
> cause any harm, but mail won't go through if I do that, and it doesn't
> return a delivery failure.
>
> The /etc/postfix/local_recipients is a map I set up when adding in the
> amavis combo a few months ago to counter the problem of valid mails
> being bounced as having invalid addresses. It may be part of my
> problem, but I've not made it around to testing that out yet.
>
> Also, I've taken the contents of aliases and added them (sans colons)
> to virtual and can deliver messages to those names in that arrangement.
>
> Essentially, I'm confused, as you can likely tell. Can you clarify why
> my setup isn't behaving as I expect, or where I'm thinking incorrectly?
> Thanks for your effort!
>



The alias_maps is only for local recipients, and shouldn't contain any
domain names. For example:

testuser: tom

Reference: man 5 aliases

virtual_maps can do the same job as an alias file, plus more. It can be
used for local and remote recipients, and can use domain names, or not.
And can map whole domain names too.

Reference: man 5 virtual


local_recipient_maps as used to define valid recipient names, so
that Postfix accepts email for them instead of rejecting them.
Typically it points to any aliases and virtual files, and the
system password file (unix:passwd.byname).

If you typically build the aliases database with the "newaliases"
command, then leave the colons in (for Sendmail compability). If
you build it with "postmap", then omit the colons.

--
Greg














Reply With Quote
  #3 (permalink)  
Old 09-08-2006
AdminTom
 
Posts: n/a
Default Re: Alias/virtual confusion


Greg Hackney wrote:
> AdminTom wrote:
> > I'm a bit confused on aliases and virtual and delivery methods and
> > would appreciate some clarification. I'll try to keep it brief.
> >
> > BTW, I'm using postfix 1.1.11. Yes, I realize I need to upgrade. I'll
> > get around to that at some point, but I want to better understand the
> > current system before I build a new one. Other possibly relevant info:
> > I've tied this postfix into an amavis/spamassassin/clamav combo.
> >
> > I believe 'postconf -n' output is generally requested here...
> > ---
> > alias_database = hash:/etc/postfix/aliases
> > alias_maps = hash:/etc/postfix/aliases
> > command_directory = /usr/sbin
> > config_directory = /etc/postfix
> > content_filter = smtp:localhost:10024
> > daemon_directory = /usr/libexec/postfix
> > debug_peer_level = 2
> > local_recipient_maps = hash:/etc/postfix/local_recipients, $alias_maps
> > mail_owner = postfix
> > mailq_path = /usr/bin/mailq.postfix
> > manpage_directory = /usr/share/man
> > mydestination = $myhostname, localhost.localdomain,
> > localhost.$mydomain, mail.$mydomain, /etc/postfix/local-domains
> > mydomain = SOMEDOMAIN.com
> > myhostname = SOMEDOMAIN.com
> > newaliases_path = /usr/bin/newaliases.postfix
> > queue_directory = /var/spool/postfix
> > readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
> > relay_domains = /etc/postfix/relay_domains
> > sample_directory = /usr/share/doc/postfix-1.1.11/samples
> > sendmail_path = /usr/sbin/sendmail.postfix
> > setgid_group = postdrop
> > smtpd_recipient_restrictions = permit_mynetworks, check_client_access
> > hash:/etc/postfix/client_access, check_relay_domains
> > virtual_maps = hash:/etc/postfix/virtual
> > ---
> > I've only changed the domain and hostname, and removed the tabs since
> > the google reader leaves them in.
> >
> > For starters, it doesn't seem that the aliases file is parsed. If I
> > add an entry there, I can't receive mail. And I can't receive mail for
> > any of the entries there. This may be normal, since some of my reading
> > suggests that aliases is just used for local delivery, but I'm not sure
> > I get that right.
> >
> > Anything I add to virtual will receive mail. As above, some reading
> > suggests to me that this is normal for virtual delivery, which implies
> > that's what I'm using. But the default method, if I'm not mistaken, is
> > local, and I don't see where it's been explicitly changed.
> >
> > Now, if aliases isn't being parsed, then I would think removing
> > (commenting) the alias_maps and alias_database in main.cf shouldn't
> > cause any harm, but mail won't go through if I do that, and it doesn't
> > return a delivery failure.
> >
> > The /etc/postfix/local_recipients is a map I set up when adding in the
> > amavis combo a few months ago to counter the problem of valid mails
> > being bounced as having invalid addresses. It may be part of my
> > problem, but I've not made it around to testing that out yet.
> >
> > Also, I've taken the contents of aliases and added them (sans colons)
> > to virtual and can deliver messages to those names in that arrangement.
> >
> > Essentially, I'm confused, as you can likely tell. Can you clarify why
> > my setup isn't behaving as I expect, or where I'm thinking incorrectly?
> > Thanks for your effort!
> >

>
>
> The alias_maps is only for local recipients, and shouldn't contain any
> domain names. For example:
>
> testuser: tom
>
> Reference: man 5 aliases
>
> virtual_maps can do the same job as an alias file, plus more. It can be
> used for local and remote recipients, and can use domain names, or not.
> And can map whole domain names too.
>
> Reference: man 5 virtual
>
>
> local_recipient_maps as used to define valid recipient names, so
> that Postfix accepts email for them instead of rejecting them.
> Typically it points to any aliases and virtual files, and the
> system password file (unix:passwd.byname).
>
> If you typically build the aliases database with the "newaliases"
> command, then leave the colons in (for Sendmail compability). If
> you build it with "postmap", then omit the colons.
>
> --
> Greg


Thanks for the clarifications, and sorry for the delay in replying.
This helps point me in the right direction. Plain English works a
little better than the man pages sometimes.

Reply With Quote
Reply


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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0