View previous topic :: View next topic |
Author |
Message |
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 5:30 pm Post subject: |
|
|
uzik wrote: | Before you turn it on make sure you have relaying disabled.
This is default on most servers now. This will prevent spammers
from using your machine to send email. |
Is this the relay_domains parameter in main.cf? If so, I'm not entirely clear as to what I should set it to...
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 5:42 pm Post subject: |
|
|
splooge wrote: | Have your DNS admin make a new dns entry, test.yourdomain.com, have him point it to the external IP of the router, and then send a message to you@test.yourdomain.com |
Well, I followed taskara's suggestion and used dyndns.org to point efs.mine.nu to the external IP of our router. I then sent a message to root@efs.mine.nu to no avail.
I can telnet efs.mine.nu on port 25, so I know that the dyndns DNS is current. Therefore, it's still something wrong with the configuration on my machine....
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 6:14 pm Post subject: |
|
|
Ok, I got a delivery failure back for Hotmail. Here are the details:
Code: |
Reporting-MTA: dns;hotmail.com
Received-From-MTA: dns;mail.hotmail.com
Arrival-Date: Wed, 20 Aug 2003 08:33:51 -0700
Final-Recipient: rfc822;root@efs.mine.nu
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;554 <root@efs.mine.nu>: Relay access denied
|
Relay access denied? Is that the problem? How do I fix it?
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
MikePikeFL Tux's lil' helper
Joined: 19 Aug 2003 Posts: 78
|
Posted: Wed Aug 20, 2003 6:42 pm Post subject: |
|
|
Quote: | Relay access denied? Is that the problem? How do I fix it? |
Hotmail thinks you are a relay server and is denying your emails. Is your MX record set up correctly? |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Aug 20, 2003 6:42 pm Post subject: |
|
|
This help thread is a bit convoluted, let's simplify.
1. Let's not screw around with dynamic dns crap. You have a domain, use it. Add the following records to your zone file
mailtest.domain.com IN A your router IP
Make sure you have reverse DNS as well, it'll keep some ISP's from blocking you.
2. Postfix needs to be configured properly. You should only have to edit 5 fields or so. If you did more than that, you're probably going to have trouble.
mydestination = $myhostname, localhost.$mydomain
mydomain = domain.com
myhostname = mailtest.domain.com
mynetworks = 127.0.0.0/8, 10.10.44.0/24, any other IP's you want to be able to relay
mynetworks_style = subnet
myorigin = $myhostname
3. Test, test, test. You should be able to test to the server now. Start out simple by telneting to the server directly on port 25 and making sure it will accept mail to local users. Then do the same and try to send to non local servers. Repeat both test using an external mail client from you network. Repeat both test using an external client from someone else network. Sending to a non local user should fail for the last one.
4. Add the users.
5. Change the config. This should be the only line you'll need to change.
mydestination = $myhostname, localhost.$mydomain, $mydomain, anyother domains you want to accept mail for
6. Make the new server the primary MX for your domain.
If you still have problems getting Postfix to work post the output of postconf -n.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 7:22 pm Post subject: |
|
|
kashani wrote: | This help thread is a bit convoluted, let's simplify. |
Agreed.
I'll contact the dude that manages our DNS servers in awhile and tell him to add the mailtest entry.
I'll do the steps outlined.
So postfix (or sendmail, but I already am using postfix) is all I need for a basic email server, right?? Basic email server defined as being able to send and receive.
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Aug 20, 2003 7:44 pm Post subject: |
|
|
Onion Avenger wrote: |
So postfix (or sendmail, but I already am using postfix) is all I need for a basic email server, right?? Basic email server defined as being able to send and receive.
Thanks,
--Richie, the Onion Avenger |
Yep, Postfix will be just fine.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
fimblo Guru
Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Wed Aug 20, 2003 8:46 pm Post subject: |
|
|
could you do a:
Code: | grep -v "#" /etc/postfix/main.cf | grep -v ^$ > postfix_options |
and post your options?
Your postfix seems to be trying to see if 64.4.26.63 is a legal source address. _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 9:03 pm Post subject: |
|
|
fimblo wrote: | could you do a:
Code: | grep -v "#" /etc/postfix/main.cf | grep -v ^$ > postfix_options |
and post your options?
Your postfix seems to be trying to see if 64.4.26.63 is a legal source address. |
Here it is:
Code: |
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = efs-server.emeraldforest.com
mydomain = emeraldforest.com
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain $mydomain
unknown_local_recipient_reject_code = 450
mynetworks = 192.168.0.0/24, 127.0.0.0/8
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
home_mailbox = .maildir/
home_mailbox = .maildir/
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
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
manpage_directory = /usr/share/man
sample_directory = /etc/postfix/sample
readme_directory = /usr/share/doc/postfix-2.0.11
|
|
|
Back to top |
|
|
fimblo Guru
Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Wed Aug 20, 2003 9:31 pm Post subject: |
|
|
aha! Check out Proxy/NAT network addresses at http://www.postfix.org/basic.html#proxy_interfaces. I seem to rememebr that you forward port 25 from your router to your internal mailserver?
Otherwise:
* mydestination should be comma separated.
* you have two home_mailbox lines, one is enough
* You might have done this on purpose, but your myhostname contains a domain name which is non-existent:
Code: | fimblo@waoh:~> dig @ns2.readyhosting.com. efs-server.emeraldforest.com
; <<>> DiG 9.2.2 <<>> @ns2.readyhosting.com. efs-server.emeraldforest.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 23708
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;efs-server.emeraldforest.com. IN A
;; AUTHORITY SECTION:
emeraldforest.com. 86400 IN SOA ns1.readyhosting.com. hostmaster.ns1.readyhosting.com. 2001050701 10800 3600 691200 86400
;; Query time: 191 msec
;; SERVER: 63.119.175.104#53(ns2.readyhosting.com.)
;; WHEN: Wed Aug 20 23:18:08 2003
;; MSG SIZE rcvd: 110
|
note the NXDOMAIN.
On another note, I suggest you add a few lines to your main.cf, making it a little harder for UCE to get thru. Read about them at: http://www.postfix.org/uce.html _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
|
fimblo Guru
Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 9:50 pm Post subject: |
|
|
Thanks for the helpful reply!
I think that's how the mydestination in the Virtual Mailhosting guide looked, so I kept it like that. I was wondering why....
Also, main.cf came by default with two home_mailbox lines. Identical....wierd. I'll change it.
And yes, efs-server.emeraldforest.com doesn't exist. efs-server is the name of the server itself. I'll change this so it corresponds to efs.mine.nu. I didn't think it'd make much of a difference....
Thanks again fimblo,
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 10:08 pm Post subject: |
|
|
Wooohooooo!!!!!
It worked!
Looks like my general network incompetence showed when I used a hostname/domain that didn't exist yet.
I also changed mydestination, the dual home_mailbox thing, and the proxy_interfaces line to my external IP of the router.
That's super!
Now it's obvious I can use this box as a simple mail server.
Now I need to implement things like SSL, maybe Squirrelmail, etc.
Should I just keep on following the Virtual Mailhosting guide?
I don't know if I want to do all the mysql stuff...
Thanks so much for everybody's help!
Thanks fimblo for your prompt (and very helpful) replies!
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 10:10 pm Post subject: |
|
|
fimblo wrote: | Finally, I also suggest you test your system if its an open relay here:
http://www.abuse.net/relay.html
If you pass, theres a good chance that you're safe. |
Well, it looks like I pass! Thanks! Cool website!
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Wed Aug 20, 2003 10:55 pm Post subject: |
|
|
Sorry, another post:
If I can send and receive email with mutt, why then do I need courier-imap? Is mutt really special in that in can interface with the MTA (postfix) without using a protocol such as IMAP and POP? If that's the case, I'd need courier-imap for my outlook users, wouldn't I?
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
Liathus Apprentice
Joined: 21 Mar 2003 Posts: 163 Location: Fargo, ND
|
Posted: Wed Aug 20, 2003 11:21 pm Post subject: |
|
|
yes you will need a imap or pop3 server for applications such as outlook or mozilla mail to work. |
|
Back to top |
|
|
fimblo Guru
Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Thu Aug 21, 2003 6:57 am Post subject: |
|
|
The Virtual Mailserver guide explains a heck of a lot, but I never did the mysql thing myself. I used parts of the Desktop Configuration Guide which explained installing squirrelmail... works fine
About the mut thing- postfix saves received emails in a file (could be a spool file at /var/spool/mail/user or something, or your $HOME/.maildir directory... all depending on your MTA and your configuration) When you start up your MUA, it tries look for your $MAIL environment variable or it uses instructions in the configuration file to see where the mail is saved.
So in your case a MUA doesnt get mail directly from the MTA, it gets it from file. If you install pop3 or imap, you can read mail from another system via tcp/ip. _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
|
eNut n00b
Joined: 13 Jun 2003 Posts: 36
|
Posted: Thu Aug 21, 2003 2:22 pm Post subject: |
|
|
[ ..... didn't see topic was two pages ] |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Thu Aug 21, 2003 3:41 pm Post subject: |
|
|
Sorry, another post before I go on with courier-imap:
When I receive emails from my root email (root@efs.mine.nu), everything looks good in the message header except for the from field. It says:
Why is that? Where can I specify that the domain name needs to be appended there?
And thanks fimblo and Liathus - now I finally understand the need for courier-imap.
I just don't know if I want the mysql thing and all the ssl stuff. I don't think our existing email server has SSL (in fact, I'm almost postive it doesn't if I rmember my outlook settings right). Is it really necessary? I don't know if I want to install all the certificates and stuff...
--Richie, the Onion Avenger |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Thu Aug 21, 2003 4:34 pm Post subject: |
|
|
Alright, I emerged courier-imap and IMAP and POP3 works flawlessly. I tested with Outlook on an XP box. I didn't do any of the SSL stuff, and frankly I'm glad I'm not - too much hassle it seems for only a minor benefit.
I'm wondering if the from: root@ is a mutt thing, because when outlook used pop3 and imap to send and receive messages I think (should've double-checked) that it said root@efs.mine.nu just fine. I'll double-check that.
Another question: just to clarify, to add more email accounts, it's just adding more users with the adduser or equivalent commands, right? Then each user gets a ~/.maildir, right?
Thanks,
--Richie, the Onion Avenger |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Thu Aug 21, 2003 6:11 pm Post subject: |
|
|
A few things on creating users and maildir.
If they don't need to actually ssh to the machine it's best to give them a shell of /bin/false. Their home dir will still be created, but they won't have local access to the server.
Also .maildir/ is not created by default upon user creation. Postfix will create .maildir/ when the first piece of mail for that users arrives. I'd suggest sending a welcome message to all users or scripting out .maildir creation to avoid interesting error from Courier when it can't find a users .maildir/
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
Onion Avenger Apprentice
Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Thu Aug 21, 2003 6:22 pm Post subject: |
|
|
Yeah, it looks like it's a mutt thing that I got root@ without the domain name. Outlook was just fine.
Thanks for the info kashani. I remember now hearing about making user's shells point to /bin/false from somewhere.
--Richie, the Onion Avenger |
|
Back to top |
|
|
fimblo Guru
Joined: 19 Feb 2003 Posts: 306 Location: European Union, Stockholm
|
Posted: Fri Aug 22, 2003 9:53 am Post subject: |
|
|
Finally, I strongly recommend that you install ssl support for your courier-imap. ssl in postfix isnt quite as important, tho good to have.
courier-imap (and pop3 for that matter) are services which must be logged into. and without ssl support you're going to have users passing their username/password pairs in clear text...
anyone on a shared medium between the client system and the server can sniff the transfer (very easy). which is... dangerous.
in any case, good luck!
/fimblo _________________ http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto |
|
Back to top |
|
|
|