Jump to content
Froxlor Forum
  • 0

[solved] Mail bounce (unknow user)


Ward

Question

Hello,

 

I'm currently using postfix on my vps. I have an issue with my postfix server that gives the following error:

 

Jan 27 10:33:23 evolutions postfix/virtual[19223]: D2AF210E456: to=<info@xxx.be>, relay=virtual, delay=0.12, delays=0.03/0.05/0/0.04, dsn=5.1.1, status=bounced (unknown user: "info@xxx.be")

 

The mailbox is managed on another server (domain hosting company). I just want to send mails with this account from their website. Is it possible to fix this?

 

Currently my froxlor setup is a little mess. I installed nginx in front of apache and don't want to use froxlor for a week since it regenerates my apache vhost files, and that will bring down my website's. I need to take some time to update froxlor and fix everything. But doesn anybody know a quick fix for now (so the user can send mails), by changing a DB value or so? or disable the checks temporary?

 

Thanks!

Ward

Link to comment
Share on other sites

Recommended Posts

did you setup postfix to check for sender-permissions?

 

How can I check that? I think postfix wants to deliver it locally since the domain is hosted by the server. I have the problem with other domains also...

 

When i send mail from PHP to a domain hosted by froxlor I get -> bounced

When i send mail from PHP to a foreign hosted domain I get -> success

Link to comment
Share on other sites

How can I check that? I think postfix wants to deliver it locally since the domain is hosted by the server. I have the problem with other domains also...

 

When i send mail from PHP to a domain hosted by froxlor I get -> bounced

When i send mail from PHP to a foreign hosted domain I get -> success

 

This is the /etc/postfix/mysql-virtual_mailbox_domains.cf file. Maybe it helps

 

user = **
password = **
dbname = froxlor
table = panel_domains
select_field = domain
where_field = domain
hosts = 127.0.0.1

Link to comment
Share on other sites

nopaste your main.cf

 

 

 

Works for me, usual postfix/dovecot setup

 

My main.cf file

 

## General Postfix configuration
# should be the default domain from your provider eg. "server100.provider.tld"
mydomain = evolutions.**it.be

# should be different from $mydomain eg. "mail.$mydomain"
myhostname = evolutions.**it.be

mydestination = $myhostname,
       $mydomain,
       localhost.$myhostname,
       localhost.$mydomain,
       localhost
mynetworks = 127.0.0.0/8
inet_interfaces = all
append_dot_mydomain = no
biff = no

# Postfix performance settings
default_destination_concurrency_limit = 20
local_destination_concurrency_limit = 2

# SMTPD Settings
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks,
       permit_sasl_authenticated,
       reject_unauth_destination,
       reject_unauth_pipelining,
       reject_non_fqdn_recipient
smtpd_sender_restrictions = permit_mynetworks,
       reject_sender_login_mismatch,
       permit_sasl_authenticated,
       reject_unknown_helo_hostname,
       reject_unknown_recipient_domain,
       reject_unknown_sender_domain
smtpd_client_restrictions = permit_mynetworks,
       permit_sasl_authenticated,
       reject_unknown_client_hostname
# Maximum size of Message in bytes (50MB)
message_size_limit = 52428800

## SASL Auth Settings
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes

# Virtual delivery settings
virtual_mailbox_base = /var/customers/mail/
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000

# Local delivery settings
local_transport = local
alias_maps = $alias_database

# Default Mailbox size, is set to 0 which means unlimited!
mailbox_size_limit = 0
virtual_mailbox_limit = 0

### TLS settings
###
## TLS for outgoing mails from the server to another server
#smtp_tls_security_level = may
#smtp_tls_note_starttls_offer = yes
## TLS for email client
#smtpd_tls_security_level = may
#smtpd_tls_cert_file = /etc/ssl/server/evolutions.floo-it.be.pem
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes

debugger_command =
        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

Link to comment
Share on other sites

smtpd_sender_restrictions = permit_mynetworks,
       reject_sender_login_mismatch,
       permit_sasl_authenticated,
       reject_unknown_helo_hostname,
       reject_unknown_recipient_domain,
       reject_unknown_sender_domain

 

smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000

 

Schau dir die dinger nochmal genau an und entscheide was davon du evtl. nicht brauchst, wenn du mit "fremden" adressen e-mails senden willst.

(letzterer block ist bei dir 2x drin, das sollte auch raus)

Link to comment
Share on other sites

Schau dir die dinger nochmal genau an und entscheide was davon du evtl. nicht brauchst, wenn du mit "fremden" adressen e-mails senden willst.

(letzterer block ist bei dir 2x drin, das sollte auch raus)

 

English please :) ?

Link to comment
Share on other sites

English please :) ?

 

Arg, sorry, just been busy on the phone and just wrote the words down...

 

"Take a look at these two blocks and decide what you don't need/want if you want to send mails using 'foreign' addresses.

(last block even exists twice, one is enough :P)"

Link to comment
Share on other sites

I tried to put things in comment, but still the same problem. I'm using sendmail to deliver the emails (not SMTPD).

 

But what I don't get is the following. When I try to send to a foreign email address it works perfectly. But if I send out an email to an domain that is hosted by froxlor he tries to deliver it locally. For some reason he triggers the lookup in the mysql table (and can't find any account)... But what triggers this.

 

There needs to be somewhere defined that the domain also has local mailboxes, or am I not correct?

 

Thanks,

Ward

Link to comment
Share on other sites

change your mysql my.cnf to log SQL-Queries and check out what query is run when trying to send the mail. Then you'll know.

 

Below you can see the queries executed by a good call and a call that fails (since it is hosted on the server)

 

 

 

390 Query       SELECT destination FROM mail_virtual WHERE email='testing123@l*kx.be'
                   390 Query       SELECT destination FROM mail_virtual WHERE email='@l*x.be'                    
	    391 Connect     froxlor@localhost on froxlor
                   391 Query       SELECT destination FROM mail_virtual WHERE email='l*x.be'
                   393 Query       SELECT domain FROM panel_domains WHERE domain='l*kx.be'
                   ===> DELIVERED (not hosted on the server)

 

                   390 Query       SELECT destination FROM mail_virtual WHERE email='info@v*corten.be'
                   390 Query       SELECT destination FROM mail_virtual WHERE email='@v*corten.be'
                   391 Query       SELECT destination FROM mail_virtual WHERE email='v*corten.be'
                   393 Query       SELECT domain FROM panel_domains WHERE domain='v*corten.be'
                   394 Query       SELECT maildir FROM mail_users WHERE email='info@v*corten.be'
                   394 Query       SELECT maildir FROM mail_users WHERE email='@v*corten.be'
                   ==> BOUNCED (domain/web is hosted @server but no mailboxes -> other server)

Link to comment
Share on other sites

user = *
password = *
dbname = froxlor
table = panel_domains
select_field = domain
where_field = domain
hosts = 127.0.0.1

 

This one was the one standard given while installing everything with froxlor.

 

I added this additional_conditions = AND isemaildomain = 1 and now one domain is working. I still have an error on another domain -->

status=bounced (mail for v*corten.be loops back to myself)

Link to comment
Share on other sites

Allright, I updated (was much easier than I tought! Nice work guys!). I also reconfigured the postfix server with the config files given in froxlor.

 

I still have this problem: bounced (mail for v**orten.be loops back to myself)

Link to comment
Share on other sites

Okay, I think i found why it gave me the following message: bounced (mail for ***.be loops back to myself)

 

I've seen that in my panel_domains table (mysql) the value of column isbinddomain was set to 1 while it wasn't managed by bind. This was causing all this trouble :-) Just setting it to 0 and rebuilding my config files (in froxlor) was doing the trick for me.

 

d00p thanks for all the help, you've been really helping me out!

Link to comment
Share on other sites

The mailbox isn't hosted on my server, but my website needs to send emails trough that email address... Do you know how I can do this?

 

This is the domain within the panel_domains table

 

id 	domain 	adminid 	customerid 	aliasdomain 	documentroot 	ipandport 	isbinddomain 	isemaildomain 	email_only 	iswildcarddomain 	subcanemaildomain 	caneditdomain 	zonefile 	dkim 	dkim_id 	dkim_privkey 	dkim_pubkey 	wwwserveralias 	parentdomainid 	openbasedir 	openbasedir_path 	safemode 	speciallogfile 	ssl 	ssl_redirect 	ssl_ipandport 	specialsettings 	deactivated 	bindserial 	add_date 	registration_date 	phpsettingid 	mod_fcgid_starter 	mod_fcgid_maxrequests 	ismainbutsubto
10 	xxx.be 	1 	1 	NULL 	/var/customers/webs/xxx/ 	1 	1 	1 	0 	1 	0 	1 	  	1 	0 	  	  	1 	0 	1 	0 	1 	0 	0 	0 	0 	  	0 	2010121900 	1289320955 	0000-00-00 	1 	-1 	-1 	0

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...