Prev: Sender ID Filtering
Next: Milter Application
From: Sam Wootton on 22 Nov 2009 11:34 Hi, I nearly have Postfix working on Opensuse 11.1. For a non system account user, it works. For example: /var/mail/vhosts/samwootton.com/bruno gets populated with incoming mail. However, when i try to do the same for a system account user, it never reaches that message store. It was going in to /var/spool/mail/useraccount but i commented out: mail_spool_directory in mail.cf. Here are the rest of my settings: *inet_interfaces = $myhostname, localhost* > *mydestination = $myhostname* > *virtual_mailbox_maps = hash:/etc/postfix/vmailmaps* > *local_recipient_maps = $virtual_mailbox_maps* > *local_transport = virtual* > *mynetworks_style = host* > *virtual_mailbox_domains = samwootton.com* > *virtual_mailbox_base = /var/mail/vhosts* > I have commented out 'mailbox_transport' completely. Here is my vmailmaps: sam(a)samwootton.com samwootton.com/sam Could anyone help me fix this problem? Just to clarify, i can get non system account mail being delivered, but not a system account. I'm guessing it is still using the default delivery agent for that on system account? A delivery agent that looks inside /etc/passwd and /etc/aliases files? Thanks for any help. Regards, Sam -- sam(a)samwootton.com
From: Magnus =?iso-8859-1?Q?B=E4ck?= on 22 Nov 2009 13:14 On Sunday, November 22, 2009 at 17:34 CET, Sam Wootton <sam.wootton(a)gmail.com> wrote: > I nearly have Postfix working on Opensuse 11.1. > > For a non system account user, it works. For example: > > /var/mail/vhosts/samwootton.com/bruno > > gets populated with incoming mail. However, when i try to do the same > for a system account user, it never reaches that message store. Is it the same domain? Show logs. > It was going in to /var/spool/mail/useraccount but i commented out: > > mail_spool_directory > > in mail.cf. Doing so was most likely useless. > Here are the rest of my settings: Next time, post "postconf -n" output instead. > *inet_interfaces = $myhostname, localhost* > > *mydestination = $myhostname* > > *virtual_mailbox_maps = hash:/etc/postfix/vmailmaps* > > *local_recipient_maps = $virtual_mailbox_maps* > > *local_transport = virtual* > > *mynetworks_style = host* > > *virtual_mailbox_domains = samwootton.com* > > *virtual_mailbox_base = /var/mail/vhosts* The cause of your problems may very well be that you're messing with local_recipient_maps and local_transport in this manner. There are very few occasions where such a configuration makes any sense, and this is most likely not one of them. You need to read up on address classes. List local domains in mydestination. List virtual mailbox domains in virtual_mailbox_domains. List virtual alias domains in virtual_alias_domains. List relay domains in relay_domains. Unless you have a single domain that contains users in two or more of these address classes, getting the above right is all it takes. > I have commented out 'mailbox_transport' completely. That doesn't make any difference as you're not using local(8) at all. > Here is my vmailmaps: > > sam(a)samwootton.com samwootton.com/sam > > Could anyone help me fix this problem? Just to clarify, i can get non > system account mail being delivered, but not a system account. > > I'm guessing it is still using the default delivery agent for that on > system account? A delivery agent that looks inside /etc/passwd and > /etc/aliases files? Until you show us logs we can only guess. Throw in full "postconf -n" output while you're at it. -- Magnus B�ck magnus(a)dsek.lth.se
From: Sam Wootton on 23 Nov 2009 16:49 2009/11/22 Magnus Bäck <magnus(a)dsek.lth.se> > On Sunday, November 22, 2009 at 17:34 CET, > Sam Wootton <sam.wootton(a)gmail.com> wrote: > > > I nearly have Postfix working on Opensuse 11.1. > > > > For a non system account user, it works. For example: > > > > /var/mail/vhosts/samwootton.com/bruno > > > > gets populated with incoming mail. However, when i try to do the same > > for a system account user, it never reaches that message store. > > Is it the same domain? Show logs. > > > It was going in to /var/spool/mail/useraccount but i commented out: > > > > mail_spool_directory > > > > in mail.cf. > > Doing so was most likely useless. > > > Here are the rest of my settings: > > Next time, post "postconf -n" output instead. > > > *inet_interfaces = $myhostname, localhost* > > > *mydestination = $myhostname* > > > *virtual_mailbox_maps = hash:/etc/postfix/vmailmaps* > > > *local_recipient_maps = $virtual_mailbox_maps* > > > *local_transport = virtual* > > > *mynetworks_style = host* > > > *virtual_mailbox_domains = samwootton.com* > > > *virtual_mailbox_base = /var/mail/vhosts* > > The cause of your problems may very well be that you're messing with > local_recipient_maps and local_transport in this manner. There are very > few occasions where such a configuration makes any sense, and this is > most likely not one of them. You need to read up on address classes. > > List local domains in mydestination. > List virtual mailbox domains in virtual_mailbox_domains. > List virtual alias domains in virtual_alias_domains. > List relay domains in relay_domains. > > Unless you have a single domain that contains users in two or more of > these address classes, getting the above right is all it takes. > > > I have commented out 'mailbox_transport' completely. > > That doesn't make any difference as you're not using local(8) at all. > > > Here is my vmailmaps: > > > > sam(a)samwootton.com samwootton.com/sam > > > > Could anyone help me fix this problem? Just to clarify, i can get non > > system account mail being delivered, but not a system account. > > > > I'm guessing it is still using the default delivery agent for that on > > system account? A delivery agent that looks inside /etc/passwd and > > /etc/aliases files? > > Until you show us logs we can only guess. Throw in full "postconf -n" > output while you're at it. > > -- > Magnus Bäck > magnus(a)dsek.lth.se > Hi, Thank you for your quick response - apologies for my slow response. I have a single domain that has 2 categories of user (a unix holding account user, and a non-unix account user). I didn't think my set-up was that odd. After all, in main.cf, it states: "You need to update the local_recipient_maps setting if: > > - You define $mydestination domain recipients in files other than > /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. > For example, you define $mydestination domain recipients in > the $virtual_mailbox_maps files." > So i assumed that: *local_recipient_maps = $virtual_mailbox_maps* was ok. About address classes. I don't think i need to alter the transport.db, and therefore am unsure about where to define address classes and what the vlaue should be. Here is my postconf output: biff = no canonical_maps = hash:/etc/postfix/canonical command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix data_directory = /var/lib/postfix debug_peer_level = 2 defer_transports = delay_warning_time = 1h disable_dns_lookups = no disable_mime_output_conversion = no html_directory = /usr/share/doc/packages/postfix-doc/html inet_interfaces = $myhostname, localhost inet_protocols = all local_recipient_maps = $virtual_mailbox_maps local_transport = virtual mail_owner = postfix mailbox_command = mailbox_size_limit = 0 mailbox_transport = mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man masquerade_classes = envelope_sender, header_sender, header_recipient masquerade_domains = masquerade_exceptions = root message_size_limit = 10240000 message_strip_characters = \0 mydestination = $myhostname myhostname = samwootton.com mynetworks_style = host newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES relay_domains = $mydestination relayhost = relocated_maps = hash:/etc/postfix/relocated sample_directory = /usr/share/doc/packages/postfix-doc/samples sender_canonical_maps = hash:/etc/postfix/sender_canonical sendmail_path = /usr/sbin/sendmail setgid_group = maildrop smtp_sasl_auth_enable = no smtp_use_tls = no smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtpd_sasl_auth_enable = no smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_use_tls = no strict_8bitmime = no strict_rfc821_envelopes = no transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_domains = hash:/etc/postfix/virtual virtual_alias_maps = hash:/etc/postfix/virtual virtual_gid_maps = static:100 virtual_mailbox_base = /var/mail/vhosts virtual_mailbox_domains = samwootton.com virtual_mailbox_maps = hash:/etc/postfix/vmailmaps virtual_minimum_uid = 501 virtual_transport = virtual virtual_uid_maps = static:1000 -- sam(a)samwootton.com
From: tobi on 23 Nov 2009 17:45 Sam Wootton schrieb: > 2009/11/22 Magnus Bäck <magnus(a)dsek.lth.se> > > >> On Sunday, November 22, 2009 at 17:34 CET, >> Sam Wootton <sam.wootton(a)gmail.com> wrote: >> >> >>> I nearly have Postfix working on Opensuse 11.1. >>> >>> For a non system account user, it works. For example: >>> >>> /var/mail/vhosts/samwootton.com/bruno >>> >>> gets populated with incoming mail. However, when i try to do the same >>> for a system account user, it never reaches that message store. >>> >> Is it the same domain? Show logs. >> >> >>> It was going in to /var/spool/mail/useraccount but i commented out: >>> >>> mail_spool_directory >>> >>> in mail.cf. >>> >> Doing so was most likely useless. >> >> >>> Here are the rest of my settings: >>> >> Next time, post "postconf -n" output instead. >> >> >>> *inet_interfaces = $myhostname, localhost* >>> >>>> *mydestination = $myhostname* >>>> *virtual_mailbox_maps = hash:/etc/postfix/vmailmaps* >>>> *local_recipient_maps = $virtual_mailbox_maps* >>>> *local_transport = virtual* >>>> *mynetworks_style = host* >>>> *virtual_mailbox_domains = samwootton.com* >>>> *virtual_mailbox_base = /var/mail/vhosts* >>>> >> The cause of your problems may very well be that you're messing with >> local_recipient_maps and local_transport in this manner. There are very >> few occasions where such a configuration makes any sense, and this is >> most likely not one of them. You need to read up on address classes. >> >> List local domains in mydestination. >> List virtual mailbox domains in virtual_mailbox_domains. >> List virtual alias domains in virtual_alias_domains. >> List relay domains in relay_domains. >> >> Unless you have a single domain that contains users in two or more of >> these address classes, getting the above right is all it takes. >> >> >>> I have commented out 'mailbox_transport' completely. >>> >> That doesn't make any difference as you're not using local(8) at all. >> >> >>> Here is my vmailmaps: >>> >>> sam(a)samwootton.com samwootton.com/sam >>> >>> Could anyone help me fix this problem? Just to clarify, i can get non >>> system account mail being delivered, but not a system account. >>> >>> I'm guessing it is still using the default delivery agent for that on >>> system account? A delivery agent that looks inside /etc/passwd and >>> /etc/aliases files? >>> >> Until you show us logs we can only guess. Throw in full "postconf -n" >> output while you're at it. >> >> -- >> Magnus Bäck >> magnus(a)dsek.lth.se >> >> > > Hi, > > Thank you for your quick response - apologies for my slow response. > > I have a single domain that has 2 categories of user (a unix holding account > user, and a non-unix account user). > > I didn't think my set-up was that odd. After all, in main.cf, it states: > > "You need to update the local_recipient_maps setting if: > >> - You define $mydestination domain recipients in files other than >> /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. >> For example, you define $mydestination domain recipients in >> the $virtual_mailbox_maps files." >> >> > > So i assumed that: > > *local_recipient_maps = $virtual_mailbox_maps* > > was ok. About address classes. I don't think i need to alter the > transport.db, and therefore am unsure about where to define address classes > and what the vlaue should be. > > Here is my postconf output: > > biff = no > canonical_maps = hash:/etc/postfix/canonical > command_directory = /usr/sbin > config_directory = /etc/postfix > daemon_directory = /usr/lib/postfix > data_directory = /var/lib/postfix > debug_peer_level = 2 > defer_transports = > delay_warning_time = 1h > disable_dns_lookups = no > disable_mime_output_conversion = no > html_directory = /usr/share/doc/packages/postfix-doc/html > inet_interfaces = $myhostname, localhost > inet_protocols = all > local_recipient_maps = $virtual_mailbox_maps > local_transport = virtual > mail_owner = postfix > mailbox_command = > mailbox_size_limit = 0 > mailbox_transport = > mailq_path = /usr/bin/mailq > manpage_directory = /usr/share/man > masquerade_classes = envelope_sender, header_sender, header_recipient > masquerade_domains = > masquerade_exceptions = root > message_size_limit = 10240000 > message_strip_characters = \0 > mydestination = $myhostname > myhostname = samwootton.com > mynetworks_style = host > newaliases_path = /usr/bin/newaliases > queue_directory = /var/spool/postfix > readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES > relay_domains = $mydestination > relayhost = > relocated_maps = hash:/etc/postfix/relocated > sample_directory = /usr/share/doc/packages/postfix-doc/samples > sender_canonical_maps = hash:/etc/postfix/sender_canonical > sendmail_path = /usr/sbin/sendmail > setgid_group = maildrop > smtp_sasl_auth_enable = no > smtp_use_tls = no > smtpd_client_restrictions = > smtpd_helo_required = no > smtpd_helo_restrictions = > smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination > smtpd_sasl_auth_enable = no > smtpd_sender_restrictions = hash:/etc/postfix/access > smtpd_use_tls = no > strict_8bitmime = no > strict_rfc821_envelopes = no > transport_maps = hash:/etc/postfix/transport > unknown_local_recipient_reject_code = 550 > virtual_alias_domains = hash:/etc/postfix/virtual > virtual_alias_maps = hash:/etc/postfix/virtual > virtual_gid_maps = static:100 > virtual_mailbox_base = /var/mail/vhosts > virtual_mailbox_domains = samwootton.com > virtual_mailbox_maps = hash:/etc/postfix/vmailmaps > virtual_minimum_uid = 501 > virtual_transport = virtual > virtual_uid_maps = static:1000 > > > > You should not set your domainname in mydestination if you plan to receive emails for virtual users on that domain.
From: Sam Wootton on 24 Nov 2009 03:13
2009/11/23 tobi <tobster(a)tobisworld.homeip.net> > Sam Wootton schrieb: > > 2009/11/22 Magnus Bäck <magnus(a)dsek.lth.se> > > > > > >> On Sunday, November 22, 2009 at 17:34 CET, > >> Sam Wootton <sam.wootton(a)gmail.com> wrote: > >> > >> > >>> I nearly have Postfix working on Opensuse 11.1. > >>> > >>> For a non system account user, it works. For example: > >>> > >>> /var/mail/vhosts/samwootton.com/bruno > >>> > >>> gets populated with incoming mail. However, when i try to do the same > >>> for a system account user, it never reaches that message store. > >>> > >> Is it the same domain? Show logs. > >> > >> > >>> It was going in to /var/spool/mail/useraccount but i commented out: > >>> > >>> mail_spool_directory > >>> > >>> in mail.cf. > >>> > >> Doing so was most likely useless. > >> > >> > >>> Here are the rest of my settings: > >>> > >> Next time, post "postconf -n" output instead. > >> > >> > >>> *inet_interfaces = $myhostname, localhost* > >>> > >>>> *mydestination = $myhostname* > >>>> *virtual_mailbox_maps = hash:/etc/postfix/vmailmaps* > >>>> *local_recipient_maps = $virtual_mailbox_maps* > >>>> *local_transport = virtual* > >>>> *mynetworks_style = host* > >>>> *virtual_mailbox_domains = samwootton.com* > >>>> *virtual_mailbox_base = /var/mail/vhosts* > >>>> > >> The cause of your problems may very well be that you're messing with > >> local_recipient_maps and local_transport in this manner. There are very > >> few occasions where such a configuration makes any sense, and this is > >> most likely not one of them. You need to read up on address classes. > >> > >> List local domains in mydestination. > >> List virtual mailbox domains in virtual_mailbox_domains. > >> List virtual alias domains in virtual_alias_domains. > >> List relay domains in relay_domains. > >> > >> Unless you have a single domain that contains users in two or more of > >> these address classes, getting the above right is all it takes. > >> > >> > >>> I have commented out 'mailbox_transport' completely. > >>> > >> That doesn't make any difference as you're not using local(8) at all. > >> > >> > >>> Here is my vmailmaps: > >>> > >>> sam(a)samwootton.com samwootton.com/sam > >>> > >>> Could anyone help me fix this problem? Just to clarify, i can get non > >>> system account mail being delivered, but not a system account. > >>> > >>> I'm guessing it is still using the default delivery agent for that on > >>> system account? A delivery agent that looks inside /etc/passwd and > >>> /etc/aliases files? > >>> > >> Until you show us logs we can only guess. Throw in full "postconf -n" > >> output while you're at it. > >> > >> -- > >> Magnus Bäck > >> magnus(a)dsek.lth.se > >> > >> > > > > Hi, > > > > Thank you for your quick response - apologies for my slow response. > > > > I have a single domain that has 2 categories of user (a unix holding > account > > user, and a non-unix account user). > > > > I didn't think my set-up was that odd. After all, in main.cf, it > states: > > > > "You need to update the local_recipient_maps setting if: > > > >> - You define $mydestination domain recipients in files other than > >> /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. > >> For example, you define $mydestination domain recipients in > >> the $virtual_mailbox_maps files." > >> > >> > > > > So i assumed that: > > > > *local_recipient_maps = $virtual_mailbox_maps* > > > > was ok. About address classes. I don't think i need to alter the > > transport.db, and therefore am unsure about where to define address > classes > > and what the vlaue should be. > > > > Here is my postconf output: > > > > biff = no > > canonical_maps = hash:/etc/postfix/canonical > > command_directory = /usr/sbin > > config_directory = /etc/postfix > > daemon_directory = /usr/lib/postfix > > data_directory = /var/lib/postfix > > debug_peer_level = 2 > > defer_transports = > > delay_warning_time = 1h > > disable_dns_lookups = no > > disable_mime_output_conversion = no > > html_directory = /usr/share/doc/packages/postfix-doc/html > > inet_interfaces = $myhostname, localhost > > inet_protocols = all > > local_recipient_maps = $virtual_mailbox_maps > > local_transport = virtual > > mail_owner = postfix > > mailbox_command = > > mailbox_size_limit = 0 > > mailbox_transport = > > mailq_path = /usr/bin/mailq > > manpage_directory = /usr/share/man > > masquerade_classes = envelope_sender, header_sender, header_recipient > > masquerade_domains = > > masquerade_exceptions = root > > message_size_limit = 10240000 > > message_strip_characters = \0 > > mydestination = $myhostname > > myhostname = samwootton.com > > mynetworks_style = host > > newaliases_path = /usr/bin/newaliases > > queue_directory = /var/spool/postfix > > readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES > > relay_domains = $mydestination > > relayhost = > > relocated_maps = hash:/etc/postfix/relocated > > sample_directory = /usr/share/doc/packages/postfix-doc/samples > > sender_canonical_maps = hash:/etc/postfix/sender_canonical > > sendmail_path = /usr/sbin/sendmail > > setgid_group = maildrop > > smtp_sasl_auth_enable = no > > smtp_use_tls = no > > smtpd_client_restrictions = > > smtpd_helo_required = no > > smtpd_helo_restrictions = > > smtpd_recipient_restrictions = > permit_mynetworks,reject_unauth_destination > > smtpd_sasl_auth_enable = no > > smtpd_sender_restrictions = hash:/etc/postfix/access > > smtpd_use_tls = no > > strict_8bitmime = no > > strict_rfc821_envelopes = no > > transport_maps = hash:/etc/postfix/transport > > unknown_local_recipient_reject_code = 550 > > virtual_alias_domains = hash:/etc/postfix/virtual > > virtual_alias_maps = hash:/etc/postfix/virtual > > virtual_gid_maps = static:100 > > virtual_mailbox_base = /var/mail/vhosts > > virtual_mailbox_domains = samwootton.com > > virtual_mailbox_maps = hash:/etc/postfix/vmailmaps > > virtual_minimum_uid = 501 > > virtual_transport = virtual > > virtual_uid_maps = static:1000 > > > > > > > > > You should not set your domainname in mydestination if you plan to > receive emails for virtual users on that domain. > Hi, Thanks for that. Is there any reason why? Seems logical to me. It *is* my destination, why does the type of account make a difference? I have O'Reilly postfix book - and i didnt see any mention of that. So where do i specify it? Many thanks for your advice. -- sam(a)samwootton.com |