using sendmail for outgoing email.

Flakes

Distinguished
Dec 30, 2005
1,868
0
19,790
ok, hi everyone.

recently i have setup a Ubuntu system and installed a few programs, Xampp(lampp), webmin and sendmail. Now the problem i have stems from the php function mail(), i am aware that this function uses 'sendmail' as a default mail client, however i am having trouble setting up sendmail, the problem is that i want sendmail to forward any messages to our windows based mail server, then the windows mail server will send the email to the correct external address. Im not sure that this is possible, so i need a hand, does anyone know of a way to setup 'sendmail' to do this? or setup PHP to use the already setup windows mail server.
 

Flakes

Distinguished
Dec 30, 2005
1,868
0
19,790
hmm just been checking the logs, and found this message:

----- Transcript of session follows -----
550 5.1.2 <xxx@xxx.xxxxx.xxx.xxx>... Host unknown (Name server: servername.domainname.local.:
host not found)

any ideas :/ i blocked out my email addresss, domain name and servername for security.
 

linux_0

Splendid
vi /etc/mail/sendmail.cf

look for these lines

# "Smart" relay host (may be null)
DS



change DS to

DS mail.windoze.sux.com

:lol: ;)


save, exit and restart sendmail

Good luck :)
 

Flakes

Distinguished
Dec 30, 2005
1,868
0
19,790
cheers linux_0,

well ive done a few things and got it to work, i added the mailserver to the /etc/hosts file and set the following options to forward mail to our windows mail server:

Send outgoing mail via host
Forward unqualified usernames to host
Forward mail for local users to host


P.S

if i can persaude my boss, i would have the mail server fully in linux, although one thing i have noticed is that sendmail is quite slow at performing requests, my next task is to speed it up.
 

linux_0

Splendid
Oh yeah, you can use a caching name server to speed it up.

If your name servers are not configured correctly or slow to respond sendmail may take 5-20minutes to start up or do anything.

:)