LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2009, 06:36 PM   #1
whaase
Member
 
Registered: Aug 2002
Location: Calgary, Alberta, Canada
Distribution: Ubuntu Server, Ubuntu Desktop
Posts: 128

Rep: Reputation: 15
Postfix outgoing address


I set up a mail server using Ubuntu Server and followed this Howto minus the ISPConfig install

http://www.howtoforge.com/perfect-server-ubuntu-8.10

Everything works great except that all my mail comes as user@server.domain.com

I want to have it come from user@domain.com

How do I change it? I've tried everything I could find on google lol

Here is my main.cf

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhost = server.domain.ca
mydomain = domain.ca
myorigin = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = domain.ca, server.domain.ca, localhost.domain.ca, localhost.localdomain, localhost
relayhost = somerelayhost.net
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/
append_at_myorigin = no
append_dot_mydomain = no
virtual_alias_domains = server.domain.ca domain.ca

Thanks
 
Old 02-20-2009, 06:51 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Read http://www.postfix.org/ADDRESS_REWRI...E.html#generic for rewriting outgoing addresses.
 
Old 02-20-2009, 07:09 PM   #3
whaase
Member
 
Registered: Aug 2002
Location: Calgary, Alberta, Canada
Distribution: Ubuntu Server, Ubuntu Desktop
Posts: 128

Original Poster
Rep: Reputation: 15
That works for 1 user at a time, how do I set it for every user without having to manually add them all?
 
Old 02-20-2009, 07:32 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, it does both. Single user is
Code:
user@server.mydomain.com    user@mydomain.com
Domain is
Code:
@server.mydomain.com    @mydomain.com
 
Old 02-23-2009, 09:42 AM   #5
whaase
Member
 
Registered: Aug 2002
Location: Calgary, Alberta, Canada
Distribution: Ubuntu Server, Ubuntu Desktop
Posts: 128

Original Poster
Rep: Reputation: 15
I figured out what I was missing. I reconfigured Squirrel Mail and there is a option in there to enter your domain name to add after the @.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix outgoing only MickyDavies Linux - Newbie 1 02-16-2009 08:42 AM
Outgoing-only postfix server viniosity Linux - Server 4 02-15-2009 10:10 PM
postfix outgoing port ? taiwf Linux - Software 4 07-06-2006 10:59 AM
to change outgoing mac and ip address korenje Linux - Networking 3 12-31-2005 12:41 AM
outgoing source ip address ram_dhupkar Linux - Networking 1 08-26-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration