Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Relay denied and maybe some other mail help (Mostly Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kaltag
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2004
Posts: 116
Location: Boise, ID

PostPosted: Sat Feb 04, 2006 8:21 am    Post subject: Relay denied and maybe some other mail help (Mostly Solved) Reply with quote

Ok, so I've gotten virtual servers working with apache and have 4 sites currently hosted just fine. Now I want to setup email for them but I'm not worried about the virtual server setup just yet. I have a test account created on the box just to verify I can get it working. I'm using postfix/procmail/courier/squirrelmail setup right now which seems to kinda work. I'm a little confused at to what exactly the /etc/conf.d/hostname entry should be. Currently it's
Code:
HOSTNAME="server.domain.com"
I have one of my real domain names in there though. Is this correct? Also, my /etc/conf.d/domainname is set to
Code:
DNSDOMAIN="domain.com"
is that correct? Last, my /etc/hosts file entry is
Code:
192.168.1.107   server.domain.com
is that correct? My current situation is I can send an email to test@server.domain.com but NOT test@domain.com.I can send an email to anywhere on the internet though. SMTP works fine on the local network with outlook. Also, test@domain2.com and test@server.domain2.com both don't work with "relay denied" messages when sent from the external network in /var/log/mail/current. The server IP is listed and it's behind 2 routers with the proper ports forwarded.

My /etc/postfix/main.cf
Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain $mydomain
unknown_local_recipient_reject_code = 450
mynetworks_style = host
mynetworks = 127.0.0.0/8 192.168.1.0/24 192.168.0.0/24 0.0.0.0/24
mailbox_command = /usr/bin/procmail
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/procmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.0.16-r1/sample
readme_directory = /usr/share/doc/postfix-2.0.16-r1/readme
default_destination_concurrency_limit = 2
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases
home_mailbox = .maildir/


Error given for relay problem. (I think this is where it starts...)
Code:

Feb  4 00:17:59 [postfix/smtpd] >>> START Recipient address RESTRICTIONS <<<
Feb  4 00:17:59 [postfix/smtpd] generic_checks: name=permit_mynetworks
Feb  4 00:17:59 [postfix/smtpd] permit_mynetworks: bay106-f12.bay106.hotmail.com 65.54.161.22
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 127.0.0.0/8
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 127.0.0.0/8
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 192.168.1.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 192.168.1.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 192.168.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 192.168.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 0.0.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 0.0.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_list_match: bay106-f12.bay106.hotmail.com: no match
Feb  4 00:17:59 [postfix/smtpd] match_list_match: 65.54.161.22: no match
Feb  4 00:17:59 [postfix/smtpd] generic_checks: name=permit_mynetworks status=0
Feb  4 00:17:59 [postfix/smtpd] generic_checks: name=reject_unauth_destination
Feb  4 00:17:59 [postfix/smtpd] reject_unauth_destination: test@server.punchdonkey.com
Feb  4 00:17:59 [postfix/smtpd] permit_auth_destination: test@server.punchdonkey.com
Feb  4 00:17:59 [postfix/smtpd] ctable_locate: leave existing entry key test@server.punchdonkey.com
Feb  4 00:17:59 [postfix/smtpd] NOQUEUE: reject: RCPT from bay106-f12.bay106.hotmail.com[65.54.161.22]: 554 <test@server.punchdonkey.com>: Relay access denied; from=<exile_sanhusky@hotmail.com> to=<test@server.punchdonkey.com> proto=ESMTP helo=<hotmail.com>
Feb  4 00:17:59 [postfix/smtpd] generic_checks: name=reject_unauth_destination status=2
Feb  4 00:17:59 [postfix/smtpd] > bay106-f12.bay106.hotmail.com[65.54.161.22]: 554 <test@server.punchdonkey.com>: Relay access denied
Feb  4 00:17:59 [postfix/smtpd] < bay106-f12.bay106.hotmail.com[65.54.161.22]: RSET
Feb  4 00:17:59 [postfix/smtpd] > bay106-f12.bay106.hotmail.com[65.54.161.22]: 250 Ok
Feb  4 00:17:59 [postfix/smtpd] < bay106-f12.bay106.hotmail.com[65.54.161.22]: QUIT
Feb  4 00:17:59 [postfix/smtpd] > bay106-f12.bay106.hotmail.com[65.54.161.22]: 221 Bye
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 127.0.0.0/8
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 127.0.0.0/8
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 192.168.1.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 192.168.1.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 192.168.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 192.168.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostname: bay106-f12.bay106.hotmail.com ~? 0.0.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_hostaddr: 65.54.161.22 ~? 0.0.0.0/24
Feb  4 00:17:59 [postfix/smtpd] match_list_match: bay106-f12.bay106.hotmail.com: no match
Feb  4 00:17:59 [postfix/smtpd] match_list_match: 65.54.161.22: no match
Feb  4 00:17:59 [postfix/smtpd] send attr request = disconnect
Feb  4 00:17:59 [postfix/smtpd] send attr ident = smtp:65.54.161.22
Feb  4 00:17:59 [postfix/smtpd] private/anvil: wanted attribute: status
Feb  4 00:17:59 [postfix/smtpd] input attribute name: status
Feb  4 00:17:59 [postfix/smtpd] input attribute value: 0
Feb  4 00:17:59 [postfix/smtpd] private/anvil: wanted attribute: (list terminator)
Feb  4 00:17:59 [postfix/smtpd] input attribute name: (end)
Feb  4 00:17:59 [postfix/smtpd] disconnect from bay106-f12.bay106.hotmail.com[65.54.161.22]
Feb  4 00:17:59 [postfix/smtpd] master_notify: status 1
Feb  4 00:17:59 [postfix/smtpd] connection closed

Feedback is GREATLY appreciated. If you need more info please let me know :)
_________________
Yeah, I know about the recovery console. Usually, it doesn't do anything more than I can do with a match, a weedwhacker, and a sledgehammer. Actually, it does a whole lot less. - Caffinehog


Last edited by kaltag on Sun Feb 05, 2006 8:09 am; edited 1 time in total
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Feb 04, 2006 12:18 pm    Post subject: Reply with quote

If hostname -f does not give Postfix what it needs i.e. hostname.domain.com then set the hostname in /etc/postfix/main.cf . The mydestination bit cannot function correctly without it.
Back to top
View user's profile Send private message
kaltag
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2004
Posts: 116
Location: Boise, ID

PostPosted: Sat Feb 04, 2006 3:07 pm    Post subject: Reply with quote

magic919 wrote:
If hostname -f does not give Postfix what it needs i.e. hostname.domain.com then set the hostname in /etc/postfix/main.cf . The mydestination bit cannot function correctly without it.

hostname -f returns server.domain.com. There are no errors in the postfix log at startup as far as I can tell.
_________________
Yeah, I know about the recovery console. Usually, it doesn't do anything more than I can do with a match, a weedwhacker, and a sledgehammer. Actually, it does a whole lot less. - Caffinehog
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Feb 04, 2006 4:12 pm    Post subject: Reply with quote

Ive just taken a better look at your config. That's a pretty old Postfix version.

These bits are meant to be mutually exclusive.

Code:

mynetworks_style = host
mynetworks = 127.0.0.0/8 192.168.1.0/24 192.168.0.0/24 0.0.0.0/24


I'd drop the former and change the latter to 127.0.0.0/8 192.168.1.0/24 to suit the correct subnet and lose the unwanted entries at then end.
Back to top
View user's profile Send private message
kaltag
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2004
Posts: 116
Location: Boise, ID

PostPosted: Sun Feb 05, 2006 6:54 am    Post subject: Reply with quote

commenting out the mynetworks_style = host line seems to have done the trick. THANK YOU.
Now I'll get to start setting up virtual mail servers O.o While I'm at it is there a nicer looking alternative to squirrelmail for web based email? squirrelmail does the trick fine but if I could add some eycandy why not :D. Last but not least is there an open source equivalent of Cpanel so I could set a user up with their own domain and be able to control their own email addresses and handle file uploading from a web interface? Thanks again!
_________________
Yeah, I know about the recovery console. Usually, it doesn't do anything more than I can do with a match, a weedwhacker, and a sledgehammer. Actually, it does a whole lot less. - Caffinehog
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sun Feb 05, 2006 9:28 am    Post subject: Reply with quote

I'm glad you've got Postfix working. I'd recommend new posts looking for webmail and web admin progs. I hear mention of webmin, which is like cpanel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum