Results 1 to 2 of 2
Hi, I have two servers, one of them is my web server, and one of them is my mail server. On my web server I have php scripts that are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-31-2008 #1
- Join Date
- Jul 2006
I want sendmail to relay the mail to my mail server where it will do the actual sending, instead of trying to send the mail itself from my web server. I have already tried this tutorial Smarthost and it appears to be ignoring my additions to the config file or syntax is wrong. I am running postfix on my mail server box if this makes any difference.
Also right now my mail is working sending from my web server although I don't want it to and it's sending this information in the email headers Received: (from www-data@localhost). Is there any way I can remove this since it's giving away the username my webserver is running under?
- 07-31-2008 #2
I did the same kind of stuff with sendmail few months before,
This is good link
Quick HOWTO : Ch21 : Configuring Linux Mail Servers - Linux Home Networking
And this is how i did:
Mail sent from Local Linux machine to Remote Linux Mail Server which will sent the mails to outside world. Local Linux machine:10.232.13.99 Remote Linux Server machine:188.8.131.52 Things done at remote machine (184.108.40.206) ============================================== 1)First login to that destination machine as root. ssh firstname.lastname@example.org 2)Then go to mail directory. #cd /etc/mail 3)change access file -(Access file -- controls which hosts are allowed to use sendmail) #vi /etc/mail/access connect:12.167 RELAY 4)type make command, #make 5)open sendmail.mc file and make sure following line is commented.Only then sendmail will listen for connections from other machines on port 25. dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 6)creat new configuration file using following command, #m4 sendmail.mc > sendmail.cf 7)Restart the sendmail program. #service sendmail restart Things done at local machine (10.232.13.99) ========================================== 1) Make sure local sendmail port 25 is not blocked & Add ip address of remote machine in /etc/hosts file #vi /etc/hosts 220.127.116.11 xxxcomdev.xxx.com xxxcomdev 2) In sendmail.mc provide your sendmail server name and make sure DAEMON_OPTIONS is commented, #vi /etc/mail/sendmail.mc define(`SMART_HOST',`xxxcomdev.xxx.com') dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 3)creat new configuration file using following command, #m4 sendmail.mc > sendmail.cf 4)Restart the sendmail program. #service sendmail restart