
normally handled by the luser_relay setting in main.cfaudiodef wrote:Another thing I want to do is have postfix do a catch-all, so that when unknown_user@domain comes in, it routes it to a default address for that domain.
Code: Select all
# cat /etc/mail/virtual
@blueball.me meat@whitehathouston.com
@blueballed.me meat@whitehathouston.com
@whitehathouston.com meat@whitehathouston.com
@renee.whitehathouston.com meat@whitehathouston.com
Code: Select all
# grep virtual /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/mail/virtual

Start by planning honestly. Once you have it planned out how you're going to handle mailboxes on the backend (for example, you can backend to your regular old /etc/passwd users, so that mail to 'user1@domain1.com' and mail to 'user1@domain2.com' both go to the same place, /home/user1/.maildir, the homedir for a user you've added to the systemas per usual with 'useradd', or, you can do the "virtual hosting" nonsense, where user1@domain1 is viewed as different from user1@domain2)audiodef wrote:I'm leaving my shared hosting account with Godaddy and rolling my own with a VPS from vr.org. I have my site set up. Now I need to set up my mail server. I'm going with postfix based on a recommendation. How do I get started? I'm a total n00b to mail servers.
absolutely. Mind you, postfix doesn't actually use any of apache's configuration info, there's no direct tie like that, but yes, it can. The postfix side of *accepting* mail for multiple domains is easy. Where it requires more thought is deciding on *delivery*, as in, where mailboxes are stored, and how.audiodef wrote: Can I use postfix to handle email from two different domains hosted under Apache vhosts?


the guide works, just not personally a fan of courier, nor backending things to a database - but that's a personal preference.

aye, those are the defaults, for folks who host their mail with godaddyaudiodef wrote:I may have missed something about changing my MX entry in my Godaddy account. Currently, it's set to
mailstore1.secureserver.net
smtp.secureserver.net
That will work, yes. Set up only MX record, for the domain 'audiodef.com', with the MX pointed at 'audiodef.com' with a priority of zero if you can, if not that then 5audiodef wrote: Do I simply change that to audiodef.com (since audiodef.com now points to my VPS where I'm setting up postfix)?
Actually, I don't mind that at all. I do other things with MySQL, so while I can't think of WHAT exactly I could do off the top of my head, I could possibly play around with database-stored mail and my other projects.cach0rr0 wrote:The above guide works perfectly well if you don't mind backending to mysql.
Hm. I can't seem to change the default settings in my Godaddy account. It just won't let me do it, with a "the settings that could be saved have been saved" message. I could add another record, but the defaults are still there. Is this going to cause problems?cach0rr0 wrote:aye, those are the defaults, for folks who host their mail with godaddyaudiodef wrote:I may have missed something about changing my MX entry in my Godaddy account. Currently, it's set to
mailstore1.secureserver.net
smtp.secureserver.net
That will work, yes. Set up only MX record, for the domain 'audiodef.com', with the MX pointed at 'audiodef.com' with a priority of zero if you can, if not that then 5audiodef wrote: Do I simply change that to audiodef.com (since audiodef.com now points to my VPS where I'm setting up postfix)?
Can also add a new A record, that still points at the same host, but named, say, 'smtp.audiodef.com', and then set your MX to be 'smtp.audiodef.com' - this gives you no functional advantage, just easier on the eyes (for me personally) to see an MX that's host.domain.tld and not domain.tld - even though strictly speaking domain.tld is fine.

that guide doesnt actually store message contents in the databaseaudiodef wrote: Actually, I don't mind that at all. I do other things with MySQL, so while I can't think of WHAT exactly I could do off the top of my head, I could possibly play around with database-stored mail and my other projects.

should be able to go here:audiodef wrote: Hm. I can't seem to change the default settings in my Godaddy account. It just won't let me do it, with a "the settings that could be saved have been saved" message. I could add another record, but the defaults are still there. Is this going to cause problems?

None of that is strictly necessary unless you want phpmyadmin. I tend to avoid it, if nothing else because it has a relatively long and seedy history of nasty vulns. Not that there are better packages out there for such a thing, but an unnecessary risk as the tool itself is unnecessary (IMHO - I just do all my mysql stuff on the command line, and actually find it a bit easier)audiodef wrote:In this guide, code listing 9.2 is somewhat ambiguous. I did have a default ssl conf, but...
Do I add a NameVirtualHost host.domain.name:443 and at what point in the file, if so?
Code: Select all
<IfDefine SSL_DEFAULT_VHOST>
<IfModule ssl_module>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/apache2/bauer.crt
SSLCertificateKeyFile /etc/ssl/apache2/bauer.key
ServerName whitehathouston.com
ServerAlias www.whitehathouston.com
SSLOptions StrictRequire
SSLProtocol all -SSLv2
DocumentRoot /www/whitehathouston.com/htdocs
<Directory /www/whitehathouston.com/htdocs/>
SSLRequireSSL
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/apache2/bauer.crt
SSLCertificateKeyFile /etc/ssl/apache2/bauer.key
ServerName mail.whitehathouston.com
SSLOptions StrictRequire
SSLProtocol all -SSLv2
DocumentRoot /www/mail.whitehathouston.com/htdocs
<Directory /www/mail.whitehathouston.com/htdocs/>
SSLRequireSSL
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/apache2/bauer.crt
SSLCertificateKeyFile /etc/ssl/apache2/bauer.key
ServerName sysmon.whitehathouston.com
SSLOptions StrictRequire
SSLProtocol all -SSLv2
DocumentRoot /usr/share/nagios/htdocs
<Directory /usr/share/nagios/htdocs/>
SSLRequireSSL
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
</IfModule>
</IfDefine>
</IfDefine>
Code: Select all
cd /path/to/audiodef.com/htdocs
mkdir phpmyadmin
If you want people to be able to browser to 'serverdef.audiodef.com' (just as an aside, i realize that's not what you're asking) you'd need a new DNS entry at GoDaddy, probably another CNAME pointed at @, and then add 'serverdef.audiodef.com' to the ServerAlias value for whichever VirtualHost you want such requests to be routed to (or, if you want serverdef.audiodef.com to serve completely different content, add a new VirtualHost block specifically for that purpose, point it at whichever path in the DocumentRoot that'll have the files you want to serve, and that's done and done)host.domain.name = ? On my hosting account, I named my server serverdef, so does host.domain.name = audiodef.com or does it = serverdef.audiodef.com?
Code: Select all
(98)Address already in use: make_sock: could not bind to address [::]:443

audiodef wrote:Code: Select all
(98)Address already in use: make_sock: could not bind to address [::]:443
Code: Select all
grep -r Listen /etc/apache2/*
