HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Recipient address rejected: User unknown in virtual mailbox table) (http://www.howtoforge.com/forums/showthread.php?t=59381)

Pitmaster 4th November 2012 20:51

Recipient address rejected: User unknown in virtual mailbox table)
 
Dear people,
This is the first time I use ISPconfig instead of Webmin. After a fire in the server I had to redo my configuration.
Now I did it this time using a great looking howto on this site. However I get a massage back when I send a email to an address on my server:
Recipient address rejected: User unknown in virtual mailbox table)

I did make the user, in the mail_user it is there, in the mail_access table there is nothing.

Wich information do we need here to judge this quest? postconf -n is given, replaced real names and domain names.

Thanks in advance, Nico

alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
dovecot_destination_recipient_limit = 1
header_checks = regexp:/etc/postfix/header_checks
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
message_size_limit = 0
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = mydomain.nl, localhost, localhost.localdomain
myhostname = mydomain.nl
mynetworks = 127.0.0.0/8 [::1]/128 10.0.0.0/24
myorigin = /etc/mailname
nested_header_checks = regexp:/etc/postfix/nested_header_checks
owner_request_special = no
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
readme_directory = no
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/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

till 5th November 2012 11:25

Quote:

I did make the user, in the mail_user it is there, in the mail_access table there is nothing.
Thats ok. Mail access is used for email transports only e.g. wehn you use ispconfg on front of a exchange mailserver.

Quote:

Wich information do we need here to judge this quest?
Which exact tutorial did you use and which error messages do you get in the mail log file.

Quote:

mydestination = mydomain.nl, localhost, localhost.localdomain
In a postfix virtulal mailserver setup, you may not list a domain that shall be used for mailboxes as mydomain or myhostname, thats why the installation guide instructs you to use server1.example.com and not example.com as hostname. So if the domain you have problems with is mydomain.nl, then replace mydomain.nl with server1.mydomain.nl or a similar subdomain in postfix my.cnf, /etc/hostname and /etc/hosts and restart the server.

Pitmaster 5th November 2012 15:35

http://www.howtoforge.com/perfect-se...ispconfig-3-p4


And mail.err gif this:
Nov 5 15:25:02 server1 postfix/smtpd[5543]: error: unsupported dictionary type: mysql
Nov 5 15:26:07 postfix/smtpd[5543]: last message repeated 4 times

And mail.log gif this:
Nov 5 15:31:46 server1 postfix/pickup[5330]: 96EF582D65: uid=33 from=<www-data>
Nov 5 15:31:46 server1 postfix/proxymap[5333]: warning: mysql:/etc/postfix/mysql-virtual_forwardings.cf is unavailable. unsupported dictionary type: mysql
Nov 5 15:31:46 server1 postfix/cleanup[5585]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@server1"
Nov 5 15:31:46 server1 postfix/cleanup[5585]: warning: 96EF582D65: virtual_alias_maps map lookup problem for root@server1 -- deferring delivery

Nico

till 5th November 2012 15:36

The postfix mysql package is not install.Please rerun this command from the tutorial:

Code:

apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve sudo

Pitmaster 5th November 2012 15:43

My mysql-virtual_forwardings.cf =

user = ispconfig
password = hereisacryptedpasswordbyispconfig
dbname = dbispconfig
table = mail_forwarding
select_field = destination
where_field = source
additional_conditions = and active = 'y' and server_id = 1

The database exist.
The table exist.
The field exist but is empty.

Nico

Pitmaster 5th November 2012 16:07

I did what you suggested to me but it didn't had any effect, still getting the mail back.
Somethings change:
mail.log now has:

Nov 5 15:45:06 server1 postfix/smtp[21874]: 7B58F82CD7: to=<veronica@mydomain.nl>, relay=mx1.nedlinux.com[194.109.193.80]:25, delay=166025, delays=166010/0.02/0.2/15, dsn=5.5.2, status=bounced (host mx1.nedlinux.com[194.109.193.80] said: 504 5.5.2 <root@server1>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))
Nov 5 15:45:11 server1 postfix/smtp[21867]: 5BB3582CCD: to=<nico@mydomain.nl>, relay=mx1.nedlinux.com[194.109.193.80]:25, delay=311709, delays=311694/0.02/0.1/15, dsn=5.5.2, status=bounced (host mx1.nedlinux.com[194.109.193.80] said: 504 5.5.2 <root@server1>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))
Nov 5 15:45:21 server1 postfix/cleanup[21878]: C9ACA82C5A: message-id=<20121105144521.C9ACA82C5A@mydomain.nl>
Nov 5 15:45:21 server1 postfix/qmgr[21856]: C9ACA82C5A: from=<>, size=2646, nrcpt=1 (queue active)
Nov 5 15:45:21 server1 postfix/bounce[21876]: 7B58F82CD7: sender non-delivery notification: C9ACA82C5A
Nov 5 15:45:21 server1 postfix/qmgr[21856]: 7B58F82CD7: removed

Nico

Pitmaster 5th November 2012 16:38

mail.err doesn't gif messages at all any more. So that's good news.
I think it had to do with mysql not configured. Thank's for that.

Nico

till 5th November 2012 16:40

Quote:

I did what you suggested to me but it didn't had any effect, still getting the mail back.
It worked fine and solved the first issue as you get a completely different message now. your messages get denied now because wou set a wrong hostname, you have to use a fully qulified hostname as described in the tutorial. A fully qulaified hostname is e.g. "server1.yourdomain.com" but your server uses currently just "server1" which is not a valid hostname for a server that delivers email over the internet.

Pitmaster 5th November 2012 16:55

So Till,
if my 'machinename' is server1 and I have bought a domainname like mydomain.com what do I have to do then to get a FQDN for postfix?

If I look into /etc/mailname it say correctly 'server1' (without quotes)
If I look into /etc/hosts it say correctly '127.0.0.1 server1'
if I look into /etc/hostname it say correctly 'server1'
main.cf now looks:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = server1.mydomain.com
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = server1, localhost, localhost.localdomain
mynetworks = 127.0.0.0/8 [::1]/128 10.0.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
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
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
message_size_limit = 0
html_directory = /usr/share/doc/postfix/html
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

Nico

till 5th November 2012 17:41

Quote:

If I look into /etc/mailname it say correctly 'server1' (without quotes)
Thats wrong, as server1 is not a fqdn. Edit the file and change it to server1.mydomain.com

Quote:

If I look into /etc/hosts it say correctly '127.0.0.1 server1'
Thats wrong as well, change it to server1.mydomain.com

Quote:

if I look into /etc/hostname it say correctly 'server1'
And thats wrong too, change it to server1.mydomain.com

then run:

/etc/init.d/hostname restart

toapply the changed hostname.

You are running a internet server here, not a local office server. Internet server communicate with each other trough their fqdn. If you use server1 as hostname, no other server in the internet will be able to find your system and will reject your mails for that reason.

Btw, if you would have set the hostname correctly as described in chapter 7 of the installation guide http://www.howtoforge.com/perfect-se...ispconfig-3-p3, then your mail setup would have worked out of the box.


All times are GMT +2. The time now is 10:52.

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