Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to relay mail (Yet Another)
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
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Sun Sep 26, 2004 1:26 pm    Post subject: Unable to relay mail (Yet Another) Reply with quote

Sorry for yet another thread like this but the others didn't seem much of help to me. I followed the email for the home network guide and have a simple mailserver running on my box which can accept email from local and external sources. I can also send to other local users but cannot figure out exactly how to relay the mail onto my isp for external addresses.

I Thought it may have been related to my tls and the certificates it loaded so after trying a few things i accidently ended up losing the certificates/pem files and dont know how to get them back.
Code:

Sep 27 00:57:43 [postfix/smtpd] starting TLS engine
Sep 27 00:57:43 [postfix/smtpd] TLS engine: cannot load CA data
Sep 27 00:57:43 [postfix/smtpd] 14024:error:02001002:system library:fopen:No such file or directory:bss_file.c:104:fopen('/etc/ssl/postfix/server.pem','r')


I figure this is probably the problem here
Code:
Sep 27 01:09:44 [postfix/smtp] warning: database /etc/postfix/saslpass.db is older than source file /etc/postfix/saslpass
Sep 27 01:10:04 [postfix/smtp] B9CA92BF5A: to=<someaddress@domain.com>, relay=none, delay=20, status=deferred (Host or domain name not found. Name service error for name=mail.orcon.net.nz type=MX: Host not found, try again

I wouldn't have a clue how to figure out the MX for my isp, i just thought it would be the smtp server.

here is my
cat /etc/postfix/main.cf | grep ^[^#]

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = yak.yak-attack.no-ip.com
mydomain = yak-attack.no-ip.com
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 450
mynetworks_style = subnet
mynetworks = 192.168.1.0/24, 127.0.0.0/8
home_mailbox = .maildir/
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/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.1.3/readme
default_destination_concurrency_limit = 2
mail_spool_directory = /var/spool/mail
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_auth_destination, permit_mynetworks, check_relay_domain, reject_unauth_destination
smtpd_use_tls=yes
smtpd_tls_auth_only=yes
smtpd_tls_key_file = /etc/ssl/postfix/server.key
smtpd_tls_cert_file = /etc/ssl/postfix/server.crt
smtpd_tls_CAfile = /etc/ssl/postfix/server.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout=3600s
tls_random_source = dev:/dev/urandom
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/saslpass
smtp_sasl_security_options=
relayhost=mail.orcon.net.nz
myorigin=$mydomain


I've been at it for a couple of weeks now and just am not having any luck, any help/suggests would be greatly apprieciated
Back to top
View user's profile Send private message
duncanH
n00b
n00b


Joined: 11 Mar 2004
Posts: 10

PostPosted: Thu Oct 14, 2004 6:04 pm    Post subject: Reply with quote

Quote:
but cannot figure out exactly how to relay the mail onto my isp for external addresses


why bother? if I'm reading correctly, you want your ISP to deliver mail to <users>@anythingotherthanyourdomain.com?

Why not just allow postfix to deliver directly to the mailservers for the destination domains?
Quote:

I wouldn't have a clue how to figure out the MX for my isp, i just thought it would be the smtp server.

correct.

Also, postconf -n shows everything in main.cf that has been altered from the default so you don't need to bother with your useless use of cat [url]http://en.wikipedia.org/wiki/Cat_(Unix)[/url] which could be grep ^[^#] < /etc/postfix/main.cf anyway.
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Sun Oct 17, 2004 5:37 am    Post subject: Reply with quote

The guide on the forums suggested that i used my isp as a relay due to the fact i dont have a domain/mx records. Otherwise my mail will likely be marked as spam, guess its worth a try though.
Back to top
View user's profile Send private message
duncanH
n00b
n00b


Joined: 11 Mar 2004
Posts: 10

PostPosted: Mon Oct 18, 2004 5:23 pm    Post subject: Reply with quote

How is this mail server able to receive mail from external sources without an MX record? Are you receiving mail addressed as <user>@<ipaddress> ?
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Sat Oct 23, 2004 11:07 am    Post subject: Reply with quote

duncanH wrote:
How is this mail server able to receive mail from external sources without an MX record? Are you receiving mail addressed as <user>@<ipaddress> ?


yeah i recieve mail from everywhere fine, to be honest I'm not sure what a MX record is, however I figure why would any mail system care if the destination server has a mx record? its more so that mail outgoing from my server can be verified as coming from a "trusted" server, well thats what i thought.
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Mon Oct 25, 2004 9:11 am    Post subject: Reply with quote

Quote:
to be honest I'm not sure what a MX record is, however I figure why would any mail system care if the destination server has a mx record?


What a fool! MX stands for mail exchanger mate. It tells other servers where to send mail to. Eg, you can point the mx record for domain example.com to mailserver1.provider.com etc. Some servers will try sending to the ip of the domain itself if there's no mx record so that's probably why it works.
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Wed Nov 03, 2004 12:57 pm    Post subject: Reply with quote

fleed wrote:
Quote:
to be honest I'm not sure what a MX record is, however I figure why would any mail system care if the destination server has a mx record?


What a fool! MX stands for mail exchanger mate. It tells other servers where to send mail to. Eg, you can point the mx record for domain example.com to mailserver1.provider.com etc. Some servers will try sending to the ip of the domain itself if there's no mx record so that's probably why it works.


I'm a fool because I'm still learning? oh well guess i can live with that. I thought a MX record cost money?, I'm sure there's alot of ppl on this forum running their own mail server without an MX record.
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Wed Nov 03, 2004 2:46 pm    Post subject: Reply with quote

Twink wrote:
fleed wrote:
Quote:
to be honest I'm not sure what a MX record is, however I figure why would any mail system care if the destination server has a mx record?


What a fool! MX stands for mail exchanger mate. It tells other servers where to send mail to. Eg, you can point the mx record for domain example.com to mailserver1.provider.com etc. Some servers will try sending to the ip of the domain itself if there's no mx record so that's probably why it works.


I'm a fool because I'm still learning? oh well guess i can live with that. I thought a MX record cost money?, I'm sure there's alot of ppl on this forum running their own mail server without an MX record.


Twink, MX is just a record type in DNS. It doesn't "cost money", any more than any other type of record does (meaning, whatever you pay for your DNS, which may be nothing).

When my mail server sees a mail address to someuser@example.com, it does a DNS query for the MX records for example.com. It uses the response to decide what IP address to contact (this is somewhat simplified ignoring multiple MX responses). Some mail servers may be written to attempt using a domain A (address) record if an MX is not returned, or they may simply return an undeliverable response to the sender.

If you wish to use your ISP's mail server for your outgoing mail (if you're on dynamic IP, it is MHO that this is the Right Thing To Do), look around for instructions on "smarthosting". I don't know postfix, so I'm afraid I can't be specific on how to do it. Sendmail calls it smarthost, and I'd bet postfix does too.

Dave
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