I want to deliver cron generated emails to my id, abc@example.com instead of being saved on /var/spool/clientqueue

I've done the following:

echo "set smtp=smtp.example.com" > /root/.mailrc echo "set from=abc@exmaple.com" >> /root/.mailrc

but nothing happen.

Any help ??

No I don't want to run MTA on my machine. I want to using external smtp instead of running a smtp on my machine. this is what i want.

I don't want to use postfix or sendmail. I want to use a smtp server as normally we use smtp in outlook express as outgoing server. Same like that i want to use an external smtp for cron.

I want to deliver emails on behalf of other MTA which would be use as smtp for all of the emails delivery.

  • Do you actually have an MTA running on the box? Which one? And can you post the content of /etc/aliases. – wolfgangsz Sep 18 '10 at 18:56
  • Without an MTA how do you expect the machine to be able to pass that email to another server? – John Gardeniers Sep 20 '10 at 10:30

First, the 'To' Field is defined in /etc/aliases. Check if 'root: abc@example.com' is written. For the "From" part, You should rewrite the mail. I do that in postfix with "smtp_generic_maps = hash:/etc/postfix/generic" and a file where there is root abc@example.com

Don't forget to compile the file by 'postmap /etc/postfix/generic'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.