LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 03-13-2008, 08:06 PM   #1
ellion0815
LQ Newbie
 
Registered: Mar 2008
Location: Cologne
Distribution: ArchLinux, Debian Etch
Posts: 5
Thanked: 0
"Relay acces denied" when trying to send an email to the host (postfix)


[Log in to get rid of this advertisement]
Hi there,

I found a lot of sites regarding "relay access denied", but nothing for this particular problem. Which is as follows:

Im using postfix and dovecot with virtual users and domains stored in a mysql-db. Reading mails via imap and pop3 aswell as sending mails to other hosts works like a charm with my mail client. What doesnt is sending mails to my host from another smtp server. Then I get "relay access denied". Using telnet on localhost and using anything for "mail from" and an existing virtual user as rcpt to works. I just cant figure out why. mail.log doesnt say anything about this, clearing it and then sending a mail doesnt append any line


My postfix config looks like this:
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = lvps87-230-92-40.dedicated.hosteurope.de, localhost
myhostname = lvps87-230-94-105.dedicated.hosteurope.de
mynetworks = 127.0.0.0/8, 87.230.94.105/32
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = localhost
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
I thought reject_unauth_destination in smtpd_recipient_restrictions should allow any mails for any exisiting virtual user. The user definetly exists and using telnet on localhost does this job fine, just with a mail client from outside it doesnt

Im tired as hell so I guess Im missing something here, hope you can point me to the right direction


Thanks in advance,
daniel

Last edited by ellion0815; 03-13-2008 at 08:09 PM..
ellion0815 is offline  
Tag This Post , , , , ,
Reply With Quote
Old 03-13-2008, 08:37 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
I'm not sure if this is part of the problem, but why did you set relayhost=localhost? I'd comment that line out.
billymayday is offline     Reply With Quote
Old 03-14-2008, 04:56 AM   #3
ellion0815
LQ Newbie
 
Registered: Mar 2008
Location: Cologne
Distribution: ArchLinux, Debian Etch
Posts: 5
Thanked: 0

Original Poster
ah no, that was just one of my desperate tries yesterday Disregard that
ellion0815 is offline     Reply With Quote
Old 03-14-2008, 05:08 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
OK, so what's with virtual transport = dovecot?

Dovecot is an imap/pop server, not a transfer agent
billymayday is offline     Reply With Quote
Old 03-14-2008, 05:10 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
While you're at it, have a good read of http://www.postfix.org/VIRTUAL_README.html
billymayday is offline     Reply With Quote
Old 03-14-2008, 05:14 AM   #6
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 655
Thanked: 10
Am guessing the domains are not being pulled from the sql database.
datopdog is offline     Reply With Quote
Old 03-14-2008, 05:21 AM   #7
ellion0815
LQ Newbie
 
Registered: Mar 2008
Location: Cologne
Distribution: ArchLinux, Debian Etch
Posts: 5
Thanked: 0

Original Poster
Quote:
Originally Posted by billymayday View Post
OK, so what's with virtual transport = dovecot?

Dovecot is an imap/pop server, not a transfer agent
No, you can use dovecot for delivering. I put this into my master.cf
"dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}"


As I said, sending and receiving works, sending mails to my host jsut works locally, so it has to be something about virtual_domains I guess. Im currently making a hashfile out of it to check.

My mysql-virtual-mailbox-domains.cf:
Code:
# mysql connection stuff
query = SELECT 1 FROM virtual_domains WHERE name='%s'
and mysql-virtual-alias-domains.cf:

Code:
query = SELECT 1 FROM virtual_domains WHERE name='%s'
It seems like postfix thinks it isnt responsible for this domain, however, querying these with postmap -q works

Last edited by ellion0815; 03-14-2008 at 05:26 AM..
ellion0815 is offline     Reply With Quote
Old 03-14-2008, 05:57 AM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
Fair cop on the dovecot - you learn something every day
billymayday is offline     Reply With Quote
Old 03-14-2008, 07:31 AM   #9
ellion0815
LQ Newbie
 
Registered: Mar 2008
Location: Cologne
Distribution: ArchLinux, Debian Etch
Posts: 5
Thanked: 0

Original Poster
aargh - okay, forget it. I was definetly too tired yesterday. Wasnt a postfix or dovecot issue, I forgt the mx entries for my domains

sorry for the inconvenience :/
ellion0815 is offline     Reply With Quote
Old 03-14-2008, 08:23 AM   #10
trickykid
Guru
 
Registered: Jan 2001
Posts: 23,977
Thanked: 8
Quote:
Originally Posted by ellion0815 View Post
aargh - okay, forget it. I was definetly too tired yesterday. Wasnt a postfix or dovecot issue, I forgt the mx entries for my domains

sorry for the inconvenience :/
Doh! That should always be the first step. Setup Mailserver, dig domain.com MX to verify the MX records, then proceed with testing..
trickykid is offline     Reply With Quote
Old 03-14-2008, 08:27 AM   #11
ellion0815
LQ Newbie
 
Registered: Mar 2008
Location: Cologne
Distribution: ArchLinux, Debian Etch
Posts: 5
Thanked: 0

Original Poster
The stupidest part about this is: I have about 100 mailer daemon mails in my inbox which say in the last line:

Quote:
Remote-MTA: dns; mx00.udag.de
well, that isnt my host ......


At least you people have a good laugh
ellion0815 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix "Relay access denied" cant send to other domain Proxx Linux - Server 6 01-11-2008 10:10 AM
Postfix "554 Relay access denied" alexpopescu Linux - Software 1 10-17-2005 04:22 AM
Postfix - "Relay Access Denied" clickster Linux - Software 1 09-12-2005 05:28 PM
Unable to send email "Relaying denied" ejain Linux - Software 3 05-30-2005 10:31 AM
Email Error - "Recipient address rejected: Relay access denied" ripcord Linux - Newbie 1 10-31-2002 04:00 PM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration