Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have postfix on my Ubuntu 12. My server has real domain name (ddd). But I would like to use postfix for web scripts on my server to sending out emails.

My real domain name is connected with GMail. And it works well.

I have username on my server like xxx. And the same username I have on GMail (which is connected with my domain name ddd).

So when scripts from my server sending out email to user xxx@ddd it's sending it to local user xxx on my server ddd. But i would like to receive it on GMail.

is it possible ?

my MX record is Ok.

ddd.        3600    IN  MX  5 alt2.aspmx.l.google.com.
ddd.        3600    IN  MX  10 aspmx2.googlemail.com.
ddd.        3600    IN  MX  10 aspmx3.googlemail.com.
ddd.        3600    IN  MX  10 aspmx4.googlemail.com.
ddd.        3600    IN  MX  10 aspmx5.googlemail.com.
ddd.        3600    IN  MX  1 aspmx.l.google.com.
ddd.        3600    IN  MX  5 alt1.aspmx.l.google.com.

my main dns record is also good. my real domain name is resolved well.

share|improve this question
add comment

2 Answers 2

Don't use postfix; you have no need of its power and versatility.

Use a decent nullmailer such as ssmtp instead.

share|improve this answer
    
would it be enough to install just mailutils ? –  user1016265 Apr 18 '12 at 13:20
    
That depends; a MUA such as mutt or (al)pine can send over SMTP, but mail(1) cannot. If you're going to use this for applications sending mail, just use a nullmailer. –  adaptr Apr 18 '12 at 15:05
add comment

What you are doing is invalid. You created MX records for your domain that points to Gmail servers. You should receive the emails locally and then forward them to your Gmail account.

You can setup virtual alias maps in postfix to do so.

share|improve this answer
    
can I have installed just mailutils and not any big MTA ? –  user1016265 Apr 18 '12 at 13:20
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.