Jump to content
Froxlor Forum
  • 0

postfix & dovecot: do not list domain unheiliges.de in BOTH mydestination and virtual_mailbox_domains


Thorny

Question

Hello,

 

i tryied to install dovecot and postfix for virtual users. But when i send an mail to an user, i've got the following error messages (addresses are changed ;)):

Sep 19 14:33:17 invalid postfix/trivial-rewrite[4598]: warning: do not list domain invalid.invalid in BOTH mydestination and virtual_mailbox_domains

Sep 19 14:33:19 invalid postfix/smtpd[4615]: 0D36C45207: client=static.154.214.46.78.clients.your-server.de[78.46.214.154]

Sep 19 14:33:19 invalid postfix/cleanup[4620]: 0D36C45207: message-id=<4E77368F.1020100@invalid.invalid>

Sep 19 14:33:19 invalid postfix/qmgr[4597]: 0D36C45207: from=<test@invalid.invalid>, size=1009, nrcpt=1 (queue active)

Sep 19 14:33:19 invalid postfix/local[4600]: 0D36C45207: to=<test2@invalid.invalid>, relay=local, delay=1.2, delays=1.2/0/0/0, dsn=4.1.1, status=SOFTBOUNCE (unknown user: "test2")

 

This is my main.cf:

smtpd_sender_restrictions =

permit_sasl_authenticated,

reject_sender_login_mismatch,

permit_mynetworks,

reject_unknown_hostname,

reject_unknown_recipient_domain,

reject_unknown_sender_domain,

 

smtpd_recipient_restrictions =

permit_mynetworks,

permit_sasl_authenticated,

reject_sender_login_mismatch,

reject_non_fqdn_hostname,

reject_non_fqdn_sender,

reject_non_fqdn_recipient,

reject_unauth_destination,

reject_unauth_pipelining,

reject_invalid_hostname,

reject_rbl_client sbl-xbl.spamhaus.org,

reject_rbl_client ix.dnsbl.manitu.net,

# sqlgrey enable

# check_policy_service inet:127.0.0.1:2501,

# postgrey enable

# check_policy_service inet:127.0.0.1:10023,

 

smtpd_client_restrictions =

permit_mynetworks,

permit_sasl_authenticated,

reject_unknown_client,

 

smtpd_sasl_auth_enable = yes

smtpd_sasl_authenticated_header = yes

smtpd_sasl_local_domain = $myhostname

smtpd_sasl_security_options = noanonymous

broken_sasl_auth_clients = yes

smtpd_sasl_type = dovecot

smtpd_sasl_path = private/auth

 

soft_bounce = yes

 

# Maximum size of Message in bytes (0 = unlimited)

message_size_limit = 0

mailbox_size_limit = 0

 

smtp_tls_security_level = may

smtpd_tls_security_level = may

smtpd_tls_auth_only = no

smtp_tls_note_starttls_offer = yes

smtpd_tls_key_file = /etc/ssl/invalid.invalid.key.unencrypted

smtpd_tls_cert_file = /etc/ssl/invalid.invalid.crt

# Just an example for CACert.org

smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt

smtpd_tls_loglevel = 0

smtpd_tls_received_header = yes

smtpd_tls_session_cache_timeout = 3600s

tls_random_source = dev:/dev/urandom

 

virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_alias_maps.cf

smtpd_sender_login_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf

virtual_mailbox_base = /var/customers/mail/

virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf

virtual_mailbox_limit = 0

virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf

virtual_uid_maps = static:1002

virtual_gid_maps = static:1002

virtual_create_maildirsize = yes

virtual_mailbox_extended = yes

virtual_mailbox_limit_override = yes

 

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

$smtpd_sender_login_maps

 

virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.

virtual_overquota_bounce = yes

virtual_transport = virtual

## Dovecot Settings for deliver, SASL Auth and virtual transport

# uncomment those line to use Dovecot

mailbox_command = /usr/local/libexec/dovecot/deliver

virtual_transport = dovecot

dovecot_destination_recipient_limit = 1

alias_maps = $alias_database

smtpd_sasl_path = private/auth

 

queue_directory = /var/spool/postfix

command_directory = /usr/local/sbin

daemon_directory = /usr/local/libexec/postfix

data_directory = /var/db/postfix

mail_owner = postfix

myhostname = invalid.invalid

mydomain = invalid.invalid

myorigin = $mydomain

inet_interfaces = all

unknown_local_recipient_reject_code = 550

mynetworks_style = host

debug_peer_level = 2

debugger_command =

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

ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/local/sbin/sendmail

newaliases_path = /usr/local/bin/newaliases

mailq_path = /usr/local/bin/mailq

setgid_group = maildrop

html_directory = /usr/local/share/doc/postfix

manpage_directory = /usr/local/man

sample_directory = /usr/local/etc/postfix

readme_directory = /usr/local/share/doc/postfix

 

Any hint?

 

Thanks for your time,

Thorny

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

@Thorny:

 

Could you please nopaste your whole postfix main configuration file (main.cf) now?

 

nopaste service: http://redmine.froxlor.org/projects/froxlor/pastes/new

 

and provide the link on http://redmine.froxlor.org/issues/924 ?

 

Thanks.

 

arnoldB

 

PS: If you're having the next time a problem, please write EXACTLY which DISTRIBUTION and more information about the system, you are using.

Link to comment
Share on other sites

Hi Thorny,

 

I got that error myself at least once. I don't think that there's a mistake within your main.cf. If I remember me correctly I had some mistakes in at least one of the other config files( i think I had the same content copied to twice of those config files). Please check if this is the case for you too. If not please handle your config files so we can take a look at it.

 

greetings,

 

Philnate

Link to comment
Share on other sites

I got that error myself at least once. I don't think that there's a mistake within your main.cf. If I remember me correctly I had some mistakes in at least one of the other config files( i think I had the same content copied to twice of those config files). Please check if this is the case for you too. If not please handle your config files so we can take a look at it.

 

I've checked them again: no duplicates. Here are my config files:

 

/usr/local/etc/postfix/mysql-virtual_alias_maps.cf:

user = froxlor
password = MYSQL_PASSWORD
dbname = froxlor
table = mail_virtual
select_field = destination
where_field = email
additional_conditions = and TRIM(destination) <> ''
hosts = 127.0.0.1 

 

/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf:

user = froxlor
password = MYSQL_PASSWORD
dbname = froxlor
table = panel_domains
select_field = domain
where_field = domain
additional_conditions = and isemaildomain = '1'
hosts = 127.0.0.1 

 

/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf:

user = froxlor
password = MYSQL_PASSWORD
dbname = froxlor
table = mail_users
select_field = maildir
where_field = email
hosts = 127.0.0.1 

 

/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf:

password = MYSQL_PASSWORD
dbname = froxlor
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
hosts = 127.0.0.1

Link to comment
Share on other sites

Okay, i'm a big step further. :) The error disappers after adding to the main.cf the following line:

mydestination = localhost

 

Also i fixied a defect path to dovecot delivery, what makes mit curious. i copied all config, but now i see another one, than i copied. maybe i'm just stupid ^^

 

Now i've got this error in dovecot-delivery.log on mein FreeBSD maschine:

 

.2011-09-20 14:48:48deliver(thorny2@invalid.invalid): Fatal: setgid(1002(vmail)) failed with euid=1002(vmail), gid=6(mail), egid=6(mail): Operation not permitted (This binary should probably be called with process group set to 1002(vmail) instead of 6(mail))

How can i change the process group? In the config of Froxlor i set the usergroup to 1002. Where do i have to change it, too?

Link to comment
Share on other sites

Okay, i saved it by myself. :) There were 3 others bug in my config. The missing "mydestination" seems to be a froxlor bug. Topic can be closed now! :)

Hi good you solved the problems. Everytime I setup froxlor (or earlier sysCP) I get somewhere config errors as well and that although it's a simple copy and paste job...

 

Anyway If you feel that the missing mydestination is a bug look if there's a ticket already in the Bugtracker or open one yourself, please.

Link to comment
Share on other sites

Archived

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



×
×
  • Create New...