I'm using Sendmail as an MTA. I setup a local domain example.org, everything is running well, so now I want to use this local mail server to send email to my Gmail account or any external server. Just sending not receiving.

  • Hi and welcome to the site. You might want to read our how to ask page. Have you tried anything? Did you search for how to do this? This site is for solving specific problems not for giving howtos. – terdon Jan 4 '14 at 1:04
  • What exactly is your question? – michas Jan 4 '14 at 1:12
  • If you want just to send mails, then sendmail is quite overkill. Take a look at sSMTP, it may be more sufficient for you. – Jakub Jirutka Jan 4 '14 at 1:25

I found this tutorial which gives you a setup which will forward all email to a single GMail account. The article is titled:Forwarding all email to a domain with sendmail.

  1. Changes to /etc/mail/sendmail.mc

    Change this:

    DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=')dnl

    to this:

    DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl
  2. Enable virtusertable, again in the file: /etc/mail/sendmail.mc

    FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
  3. Create /etc/mail/virtusertable

    @example.com    forwardtothisemail@gmail.com
  4. Compile the virtusertable

    $ cd /etc/mail
    $ sudo makemap hash virtusertable < virtusertable
  5. Add domain to /etc/mail/local-host-names

  6. Recompile sendmail.mc


    $ sudo sendmailconfig


    $ cd /etc/mail
    $ make
    $ /etc/init.d/sendmail restart
  • Thank you for taking time to respond, apparently that will works, i will try it this night & i will report a feedback. – ISMAIL Jan 4 '14 at 13:10

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.