Re: Directive "mynetwork" and "mynetwork_style"
On 12/14/12 01:43, Muhammad Yousuf Khan wrote: i am confuse about the utilization of directives: "mynetwork" and "mynetwork_style" is "mynetwork" directive completely dependent on "mynetwork_style". can i use only "mynetwork" for relaying messages or i always have to use "mynetwork_style" along with "mynetwork" to allow relaying to particular host or subnet. thanks in advance. mynetworks and mynetworks_style are essentially mutually exclusive; you use either one or the other. If you specify mynetworks, mynetworks_style is ignored. Each is used to specify SMTP clients that are "trusted" by the server based on their IP address. mynetworks_style is used to specify trusted clients based on their relationship to the server's IP address, while mynetworks is specifies trusted clients by explicitly giving their IP addresses or an IP address range. For example, specifying "mynetworks_style = subnet" indicates that all clients in that subnet are trusted, while mynetworks = 50.116.33.0/24 might be used instead to say the same thing (if 50.116.33.0/24 describes your subnet). These clients are "trusted" because the mynetworks (or mynetworks_style) parameter is used by smtpd to determine who is allowed to relay mail when the smtpd_relay_restrictions parameter contains "permit_mynetworks." If you haven't changed smtpd_relay_restrictions in your config, it defaults to "permit_mynetworks, reject_unauth_destination," which will allow those clients listed in mynetworks (or mynetworks_style) to relay mail. You only need to use mynetworks OR mynetworks_style (but not both) to enable relaying from certain clients. Read the documentation when you get confused. It is explained quite clearly here: http://www.postfix.org/postconf.5.html#mynetworks http://www.postfix.org/postconf.5.html#mynetworks_style http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions -Will
Re: Tool to read queued messages?
On 12/13/2012 4:52 PM, David Hubbard wrote: > Thanks everyone for the postcat tip; obviously I'm > new to postfix. Finally had to get off qmail after > years of resisting. Welcome to Postfix David. I'm sure you'll find many things you like better than qmail, some maybe not so much. But I think you'll find an active support community with Postfix. The fact that the author himself still answers questions, daily, should tell you something about the level of support Postfix receives, unlike what happened to qmail. -- Stan
Re: Directive "mynetwork" and "mynetwork_style"
Thanks :) On Fri, Dec 14, 2012 at 1:35 PM, Will wrote: > > On 12/14/12 01:43, Muhammad Yousuf Khan wrote: > > i am confuse about the utilization of directives: "mynetwork" and > "mynetwork_style" > > is "mynetwork" directive completely dependent on "mynetwork_style". > can i use only "mynetwork" for relaying messages or i always have to > use "mynetwork_style" along with "mynetwork" to allow relaying to > particular host or subnet. > > thanks in advance. > > mynetworks and mynetworks_style are essentially mutually exclusive; you use > either one or the other. If you specify mynetworks, mynetworks_style is > ignored. Each is used to specify SMTP clients that are "trusted" by the > server based on their IP address. mynetworks_style is used to specify > trusted clients based on their relationship to the server's IP address, > while mynetworks is specifies trusted clients by explicitly giving their IP > addresses or an IP address range. For example, specifying "mynetworks_style > = subnet" indicates that all clients in that subnet are trusted, while > mynetworks = 50.116.33.0/24 might be used instead to say the same thing (if > 50.116.33.0/24 describes your subnet). > > These clients are "trusted" because the mynetworks (or mynetworks_style) > parameter is used by smtpd to determine who is allowed to relay mail when > the smtpd_relay_restrictions parameter contains "permit_mynetworks." If you > haven't changed smtpd_relay_restrictions in your config, it defaults to > "permit_mynetworks, reject_unauth_destination," which will allow those > clients listed in mynetworks (or mynetworks_style) to relay mail. You only > need to use mynetworks OR mynetworks_style (but not both) to enable relaying > from certain clients. > > Read the documentation when you get confused. It is explained quite clearly > here: > http://www.postfix.org/postconf.5.html#mynetworks > http://www.postfix.org/postconf.5.html#mynetworks_style > http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions > > -Will >
Problem: Recipient address rejected: User unknown in virtual mailbox table
I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu Server 10.04. I believe that when the mail comes in, something in the settings is not allowing the data to be parsed correctly resulting in the User unknown error. Here is the output from postfinger postfinger - postfix configuration on Fri Dec 14 11:14:05 PST 2012 version: 1.30 Warning: postfinger output may show private configuration information, such as ip addresses and/or domain names which you do not want to show to the public. If this is the case it is your responsibility to modify the output to hide this private information. [Remove this warning with the --nowarn option.] --System Parameters-- mail_version = 2.7.0 hostname = www.cross-town-traffic-software.com uname = Linux www.cross-town-traffic-software.com 3.6.5-linode47 #1 SMP Sun Nov 4 12:51:35 EST 2012 i686 GNU/Linux --Packaging information-- looks like this postfix comes from deb package: postfix-2.7.0-1ubuntu0.2 --main.cf non-default parameters-- alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes debug_peer_list = 127.0.0.1 home_mailbox = mail/ html_directory = /usr/share/doc/postfix/html mailbox_size_limit = 3082 message_size_limit = 3072 mydestination = $mydomain,localhost, localhost.localdomain myhostname = cross-town-traffic-software.com mynetworks = 127.0.0.0/8,173,255.254.7 myorigin = /etc/mailname proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps recipient_delimiter = + smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_authenticated_header = yes smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /home/vmail virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_transport = dovecot virtual_uid_maps = static:5000 --master.cf-- smtp inet n - - - - smtpd -v pickupfifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgrunix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounceunix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verifyunix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp -o smtp_fallback_relay= showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scacheunix - - - - 1 scache maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmailunix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scale
Re: Problem: Recipient address rejected: User unknown in virtual mailbox table
Am 14.12.2012 22:36, schrieb Valone: > I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu Server > 10.04. I believe that when the mail comes > in, something in the settings is not allowing the data to be parsed correctly > resulting in the User unknown error. > > --main.cf non-default parameters-- do NOT post in HTML on mailing list post output of "postconf -n" and not "main.cf" contents signature.asc Description: OpenPGP digital signature
Re: How to change modified cf files to postconf commands
Le 14/12/2012 01:55, Robert Moskowitz a écrit : > > On 12/13/2012 05:47 PM, Noel Jones wrote: >> On 12/13/2012 4:17 PM, Robert Moskowitz wrote: >>> In the totorial: >>> >>> http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent6VirtMailServer >>> >>> >>> >>> There are modified postfix .cf files. I don't want to just use a >>> modified postfix file, I want to user postconf to do the >>> modifications. And I am not experienced using things like diff to >>> work out what changes were made from the base install files. >>> >>> Can anyone lend some expertise in identifying the mods so I can work >>> this up as postconf commands? >> Why? If you're just going to paste in changes it doesn't matter too >> much if you paste in a pre-made .cf file or if you run a bunch of >> postconf commands. > > For the past 3 years I have been running with a setup based on: > > http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-fedora-14-x86_64 > > > Here the postfix changes are done via postconf, so I CAN tell what > changes are made and understand what is going on. > # postconf -d shows default settings (builtin defaults). # postconf -n shows "local" settings. that said, some "local" settings may use the same value as the default config, which is mostly useless. on the url you posted, an example is inet_interfaces = all, since this is the default: # postconf -d inet_interfaces inet_interfaces = all so the setting is useless and can be removed from main.cf. same for mydestination, alias_maps... You can chase these with something like: # postconf -n | while read parameter equal value; do default_value=`postconf -d $parameter 2>&1`; if [ "$value" = "$default_value" ]; then echo "NOTICE: Useless setting: $parameter = $value"; fi; done Such settings can be removed from main.cf. (the "2>&1" will avoid "false positives" when a parameter is "unknown" to 'postconf -d'...). >> >> Better to learn why each line is there, and why. And most >> important, if *you* need it. > > Kind of my point. What changes is the author of the tutorial really > making so I can understand why. > >> >> http://www.postfix.org/documentation.html >> http://www.postfix.org/STANDARD_CONFIGURATION_README.html >> http://www.postfix.org/VIRTUAL_README.html >> >> main.cf parameters and their defaults are documented here: >> http://www.postfix.org/postconf.5.html >> Generally, only parameters that differ from their default should be >> included in your main.cf. > > Again, what I want to get to. Understand what changes the author made > to the defaults. Looks like I will first have to learn how to > understand the output of diff. > > do not blindly follow howotos/utorials/etc. better learn from the official documentation. see Noel's postf for a few URLs. more on postfix site. you can also consider getting a copy of "the book of postfix".
Re: Directive "mynetwork" and "mynetwork_style"
Le 14/12/2012 11:28, Muhammad Yousuf Khan a écrit : > Thanks :) > and it is recommended to use mynetworks. This is because mynetwork_style may open a hole in some situations (when your netwmaks is wide but you only own few boxes in the same network. this is generally the case for residential networks). you can generally start with mynetworks = 127.0.0.1 and then add the minimum subnets or IPs that need to relay via this postfix without SASL authentication. [snip]
Re: Problem: Recipient address rejected: User unknown in virtual mailbox table
Le 14/12/2012 22:49, Reindl Harald a écrit : > > Am 14.12.2012 22:36, schrieb Valone: >> I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu Server >> 10.04. I believe that when the mail comes >> in, something in the settings is not allowing the data to be parsed >> correctly resulting in the User unknown error. >> >> --main.cf non-default parameters-- > do NOT post in HTML on mailing list > post output of "postconf -n" and not "main.cf" contents he actually did it. postfinger shows 'postconf -n' output. >
Re: Problem: Recipient address rejected: User unknown in virtual mailbox table
Le 14/12/2012 22:36, Valone, Toren W.@DMV a écrit : > I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu Server > 10.04. I believe that when the mail comes in, something in the settings > is not allowing the data to be parsed correctly resulting in the User > unknown error. you can debug your maps with postmap. for example: # postmap -q user@domain mysql:/etc/postfix/mysql-virtual_mailboxes.cf this should return "something". > [snip] > >
RE: Problem: Recipient address rejected: User unknown in virtual mailbox table
Thanks for the tip it returns Postmap: fatal: bad string length 0 < 1: mysql-virtual_mailboxes.cf_dbname = I did check the file and the dbname is supplied dbname = mail Toren Valone (916) 657-8861 Ask me about File Generation 2.0, click and send files feature! -Original Message- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of mouss Sent: Friday, December 14, 2012 2:15 PM To: postfix-users@postfix.org Subject: Re: Problem: Recipient address rejected: User unknown in virtual mailbox table Le 14/12/2012 22:36, Valone, Toren W.@DMV a écrit : > I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu > Server 10.04. I believe that when the mail comes in, something in the > settings is not allowing the data to be parsed correctly resulting in > the User unknown error. you can debug your maps with postmap. for example: # postmap -q user@domain mysql:/etc/postfix/mysql-virtual_mailboxes.cf this should return "something". > [snip] > >
Re: Problem: Recipient address rejected: User unknown in virtual mailbox table
> virtual_mailbox_domains = > proxy:mysql:/etc/postfix/mysql-virtual_domains.cf 1) What is a domain name that you have problems with? 2) What is the output of: postmap -q mysql:/etc/postfix/mysql-virtual_domains.cf domainname Where domainname is an answer to question 1) ? > virtual_mailbox_maps = > proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf 3) What is the output from: postmap -q mysql:/etc/postfix/mysql-virtual_mailboxes.cf username@domainname Where domainname is the answer from 1), and username is a user that is rejected as "user unknown in virtual mailbox table"? You may anonymize the username so that spammers won't pick it up. Wietse
RE: Problem: Recipient address rejected: User unknown in virtual mailbox table
I actually did not feed the full path, when doing that I got no error, then I fed a bad email thru got nothing with that either. Toren Valone (916) 657-8861 Ask me about File Generation 2.0, click and send files feature! -Original Message- From: Valone, Toren W.@DMV Sent: Friday, December 14, 2012 2:49 PM To: 'mouss'; 'postfix-users@postfix.org' Subject: RE: Problem: Recipient address rejected: User unknown in virtual mailbox table Thanks for the tip it returns Postmap: fatal: bad string length 0 < 1: mysql-virtual_mailboxes.cf_dbname = I did check the file and the dbname is supplied dbname = mail Toren Valone (916) 657-8861 Ask me about File Generation 2.0, click and send files feature! -Original Message- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of mouss Sent: Friday, December 14, 2012 2:15 PM To: postfix-users@postfix.org Subject: Re: Problem: Recipient address rejected: User unknown in virtual mailbox table Le 14/12/2012 22:36, Valone, Toren W.@DMV a écrit : > I have Postfix/DoveCot/SASL with mysql setup up running on Ubuntu > Server 10.04. I believe that when the mail comes in, something in the > settings is not allowing the data to be parsed correctly resulting in > the User unknown error. you can debug your maps with postmap. for example: # postmap -q user@domain mysql:/etc/postfix/mysql-virtual_mailboxes.cf this should return "something". > [snip] > >
RE: Problem: Recipient address rejected: User unknown in virtual mailbox table
Toren Valone (916) 657-8861 Ask me about File Generation 2.0, click and send files feature! -Original Message- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema Sent: Friday, December 14, 2012 3:00 PM To: Postfix users Subject: Re: Problem: Recipient address rejected: User unknown in virtual mailbox table > virtual_mailbox_domains = > proxy:mysql:/etc/postfix/mysql-virtual_domains.cf 1) What is a domain name that you have problems with? [Valone, Toren W.] cross-town-traffic-software.com 2) What is the output of: postmap -q mysql:/etc/postfix/mysql-virtual_domains.cf domainname [Valone, Toren W.] postmap: fatal: open database cross-town-traffic-softwarecom.db: No such file or directory Where domainname is an answer to question 1) ? > virtual_mailbox_maps = > proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf 3) What is the output from: postmap -q mysql:/etc/postfix/mysql-virtual_mailboxes.cf username@domainname [Valone, Toren W.] Postmap: fatal: open database x...@cross-town-traffic-software.com.db" No such file or directory Where domainname is the answer from 1), and username is a user that is rejected as "user unknown in virtual mailbox table"? You may anonymize the username so that spammers won't pick it up. Wietse
Re: Problem: Recipient address rejected: User unknown in virtual mailbox table
Valone, Toren W.@DMV: > > virtual_mailbox_domains = > > proxy:mysql:/etc/postfix/mysql-virtual_domains.cf > > 1) What is a domain name that you have problems with? > [Valone, Toren W.] cross-town-traffic-software.com > 2) What is the output of: > > postmap -q mysql:/etc/postfix/mysql-virtual_domains.cf domainname > Where domainname is an answer to question 1) ? [Valone, Toren W.] postmap: fatal: open database > cross-town-traffic-softwarecom.db: No such file or directory Sorry, I have it backwards. The corrected question is: postmap -q domainname mysql:/etc/postfix/mysql-virtual_domains.cf (i.e. the domain between -1 and mysql:// > > virtual_mailbox_maps = > > proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf > > 3) What is the output from: > > postmap -q mysql:/etc/postfix/mysql-virtual_mailboxes.cf > username@domainname > Where domainname is the answer from 1), and username is a user that is > rejected as "user unknown in virtual mailbox table"? > You may anonymize the username so that spammers won't pick it up. I had it backwards here, too. The corrected question is: postmap -q username@domainname mysql:/etc/postfix/mysql-virtual_mailboxes.cf Wietse