Looking for someone to walk me through getting this working. Im new to
the mail server, and have never got one fully working.
Welcome to E-mail hell, my friend. You're in good company. First, if you are really serious about running an email server, you'll want to study up. E-mail is like most utility services - taken for granted, but no-one wants to think about the effort involved to make it work. I'd recommend the excellent (and thankfully brief) O'Reilly book Postfix: The Definitive Guide, which is an excellent source of information on getting Postfix running.
I'd also take the time to read up on some basic "rules of the game", as a lot of the global E-mail system is basically a bunch of gentlemen's agreements to not stomp on each others deliveries. Sure, you could wade through thick mounds of documents like RFC 2142 and others, but I think we can condense this down to a few simple rules:
- Be a responsible admin. That means
having a functional abuse@yourveryowndomain.com address, and a
postmaster@yourveryowndomain.com that actually goes to something
other than a bit bucket. Sending these off to /dev/null is another
great way to land on a blacklist. After all, who wants to deal with
someone that won't listen to others about the issues they are making?
- You are now part of a community. That means you will run into other admins that have done things, erm, differently and will have different opinions on how to get things done. As long as they are sensible or have reasons for it, just relax and listen.
- In this community, you are responsible for your own server. If others catch you doing
unbecoming things (like being a spam open relay - more on that in a moment) you will be
blacklisted in short order. Do your best to do the right thing.
- Running your own server means that you have devoted YOUR resources to it. Do NOT be swayed by spammers (posing as "email marketers") telling you they have a right to do whatever they want with your resources. I've often heard this in the form of "but-but-but it's not your decision, it's the recipient's decision and you should let my email through". Your response should always be, "it is my decision, it is my server, and you are now a faded memory on my blacklist."
- Other servers are not your resources to use; you use them from the kindness and consideration of others. Be kind to other admins and keep in mind the "golden rule" with regard to sending large volumes of email to their servers. Would you like it if someone forwarded an email message to 2,000 different mailboxes on your server, tying up delivery for several minutes?
- After you have everything set up and running for awhile, go back and check your logs periodically. Yes, those THOUSANDS OF ENTRIES PER HOUR are spammers trying to either (a) deliver their pork by-product to your INBOX or (b) use you as a springboard to deliver it to someone else. Which leads us to...
- Spammers will shift tactics every few months. Usually a small adjustment in your anti-spam settings will suffice to make the nuisance go away.
- Do not, for the love of ${DIETY}, run an open relay on the public side of the internet. The concept of an open relay, i.e. a machine that takes email from anyone and delivers it to anywhere, is a relic from ye olde days of yore, when the Internet was a kinder, gentler place. In today's times, spammers WILL find you, they WILL turn your machine into their very own personal E-mail machine gun, and they WILL end up slandering your good name in the process.
- You'll run into admins that don't care about their servers, and like a defensive driver looks for other (stupid) drivers on the road, you'll need to look out for them.
- Bad admins usually configure bad servers. There are commercial providers out there that just want to make a quick buck, and they don't care what happens to everyone else when they "dain-bramage" their servers. This means you will run into servers that do stupid things, and some admin will get on the phone with you and want to swap spit over why it's "your problem" and not theirs. Double-check your server and make sure it really isn't you, then politely inform them of their error with a clue-by-four...
There's much, much more, but those basic things should get you pointed in the right direction.
I can't get any mail client to work,
With regard to the "client can't send" portion of your question, the issue is related to the domains you accept email for. Specifically, your post mentions:
mydestination =
myhostname = my.domain.com
Both of those are incorrect. Look here to set the mydestination
parameter, and here for the myhostname
parameter. Those two parameters basically tell postfix what it will accept for delivery, based on what is on the right-half of the To: email address. Having them set to nothing and my.domain.com
means it will only accept delivery for my.domain.com
but it still won't deliver it because mydestination
is blank. I could be wrong, but I don't think that is what you were wanting.
Best Answer
you can easily integrate postfix with dovecot sasl, and interface dovecot with MySQL. Have a look at: http://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL and http://workaround.org/ispmail
I successfully use postfix+dovecot sasl with password file authentication:
dovecot cfg:
part of postfix cfg: