Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

postfix error Relay access denied. trying to setup virtual domains

14 views
Skip to first unread message

periferral

unread,
Oct 16, 2009, 1:34:28 AM10/16/09
to
Hello all
I am trying to get postfix working as a part of my email server. I am
running this on debian and using LDAP. Here is the output of my
configuration

dns:/etc/postfix# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
inet_interfaces = all
mailbox_size_limit = 0
mydestination = dns.example.com, localhost.example.com, , localhost
myhostname = dns.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_sasl_auth_enable = no
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/CA/keys/example.crt
smtpd_tls_key_file = /etc/ssl/CA/keys/example.key
smtpd_tls_session_cache_database = btree:${data_directory}/
smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = ldap:ldapalias
virtual_gid_maps = static:999
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = ldap:domains
virtual_mailbox_maps = ldap:accounts
virtual_minimum_uid = 999
virtual_transport = dovecot
virtual_uid_maps = static:999

The LDAP stuff seems to be working fine.
dns:/etc/postfix# postmap -q exa...@example.com ldap:accounts
example/,postmaster/
dns:/etc/postfix# postmap -q exa...@example.com ldap:ldapalias
exa...@example.com,postm...@example.com
dns:/etc/postfix# postmap -q exa...@example.com ldap:domains
example.com,example.com
dns:/etc/postfix#

However, when I send an email from an external address to postfix, I
see this in my error logs

Oct 15 15:34:38 dns postfix/smtpd[8639]: connect from smtp1.company.com
[208.70.196.45]
Oct 15 15:34:38 dns postfix/smtpd[8639]: NOQUEUE: reject: RCPT from
smtp1.company.com[208.70.196.45]: 554 5.7.1 <exa...@example.com>:
Relay access denied; from=<us...@company.com> to=<exa...@example.com>
proto=ESMTP helo=<smtp1.company.com>
Oct 15 15:34:43 dns postfix/smtpd[8639]: disconnect from
smtp1.company.com[208.70.196.45]


If I add mydomain to mydestination, the local transport takes over and
it seems to work. However I want to user virtual transport and I'm
having no luck with it.

Any help is appreciated.
thanks

Dan

unread,
Oct 26, 2009, 5:06:12 PM10/26/09
to
> dns:/etc/postfix# postmap -q exam...@example.com ldap:accounts
> example/,postmaster/
> dns:/etc/postfix# postmap -q exam...@example.com ldap:ldapalias
> exam...@example.com,postmas...@example.com
> dns:/etc/postfix# postmap -q exam...@example.com ldap:domains

> example.com,example.com
> dns:/etc/postfix#
>
> However, when I send an email from an external address to postfix, I
> see this in my error logs
>
> Oct 15 15:34:38 dns postfix/smtpd[8639]: connect from smtp1.company.com
> [208.70.196.45]
> Oct 15 15:34:38 dns postfix/smtpd[8639]: NOQUEUE: reject: RCPT from
> smtp1.company.com[208.70.196.45]: 554 5.7.1 <exam...@example.com>:
> Relay access denied; from=<u...@company.com> to=<exam...@example.com>

> proto=ESMTP helo=<smtp1.company.com>
> Oct 15 15:34:43 dns postfix/smtpd[8639]: disconnect from
> smtp1.company.com[208.70.196.45]
>
> If I add mydomain to mydestination, the local transport takes over and
> it seems to work. However I want to user virtual transport and I'm
> having no luck with it.
>
> Any help is appreciated.
> thanks

I do the following
relay_domains = $config_directory/relay_domains
then in the file "relay_domains", just list the domains that you want
to relay, one per line.

I haven't setup postfix with ldap yet, but I'm sure there is an entry
for relay domains if you don't want to put it in a text file. Then
again if its just one domain, you can save an ldap lookup by putting
it in a flat file.

0 new messages