Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
 
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 at 1:04
 
What exactly is your question? –  michas Jan 4 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 at 1:25
add comment

1 Answer

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=127.0.0.1')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    [email protected]
    
  4. Compile the virtusertable

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

    example.com
    
  6. Recompile sendmail.mc

    Ubuntu

    $ sudo sendmailconfig
    

    Fedora/CentOS/RHEL

    $ cd /etc/mail
    $ make
    $ /etc/init.d/sendmail restart
    
share|improve this answer
 
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 at 13:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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