Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Brave Dave on December 10, 2008, 05:11:10 AM

Title: Admin From Address
Post by: Brave Dave on December 10, 2008, 05:11:10 AM
The default from address for the smeserver for administrative notices is admin@yourdomain.tld

Of course you can change the domain


If the domain is a makeup, mycompany.local then the domain is invalid.

Can I just change this from address with a db variable etc  ?
-- or --
Is the only way to change the servers domain ?

(because mail servers reject the messages because the from is invalid)
Title: Re: Admin From Address
Post by: thomasch on December 10, 2008, 09:42:57 AM

login to SMEserver console as admin, select #2.Configure this server
and change your domain from there.

thomas
Title: Re: Admin From Address
Post by: Stefano on December 10, 2008, 10:19:45 AM
login to SMEserver console as admin, select #2.Configure this server
and change your domain from there.
nge my domain
thomas

this is not, IMO, a good answer.. I wish my internal lan domain something like mydomain.local.. I don't want to change it to something different..

ciao
Stefano
Title: Re: Admin From Address
Post by: CharlieBrady on December 10, 2008, 12:04:53 PM
Can I just change this from address with a db variable etc  ?
-- or --
Is the only way to change the servers domain ?

No, and yes.
Title: Re: Admin From Address
Post by: Stefano on December 10, 2008, 12:35:18 PM
quoting from qmail faq (http://cr.yp.to/qmail/faq/appearance.html#user-masquerading)

Quote
Controlling the appearance of outgoing messages

Queston: How do I set up user masquerading? I'd like my own From lines to show "The Boss" <boss@af.mil> rather than god@heaven.af.mil.

Answer: Add MAILHOST=af.mil, MAILUSER=boss, and MAILNAME='The Boss' to your environment.
To override From lines supplied by your MUA, add QMAILINJECT=f to your environment.

is this a solution?

tia
ciao
Stefano
Title: Re: Admin From Address
Post by: Brave Dave on December 11, 2008, 12:22:35 AM
Think I'm at this solution

mkdir -p /etc/e-smith/templates-custom/var/qmail/control
echo mydesireddomain.tld >/etc/e-smith/templates-custom/var/qmail/control/defaulthost
signal-event email-update
Title: Re: Admin From Address
Post by: Marco Hess on December 11, 2008, 02:20:32 AM
Interesting solution. I found that by using 'defaulthost' to specify the domain, it treats local users (like in commandline: mail admin) as remote users and immediately forwards those without looking at any local user forwarding addresses.

If I use 'defaultdomain' it sees the local users and correctly uses any forwarding addresses. However, I am back at the 'user@localdomain' can not be verified problem. I tried to override various other settings in /var/qmail/control and setting various environments variables (incl. QMAILSHOST) without a lot of success.

What would the qmail configuration be to have local users processed as local users so their forwarding address are used while in the outgoing From line it is also properly specified as coming from the mydisireddomain.tld

Title: Re: Admin From Address
Post by: Brave Dave on December 11, 2008, 02:28:45 AM
This problem doesn't apply to me - there are no local email accounts - I almost want the opposite

but

I'm thinking that (these are untested, but seem logical)
Through the server manager add the same domain
and
leave the dns resolution to the internet

This way;

Title: Re: Admin From Address
Post by: CharlieBrady on December 11, 2008, 07:21:41 AM
I wish my internal lan domain something like mydomain.local.. I don't want to change it to something different..

Why do you wish that, and why don't you want to change it to a valid domain?
Title: Re: Admin From Address
Post by: Brave Dave on December 11, 2008, 08:26:26 AM
I'm not sure why nenonano wants it

but
in the case I'm applying it to, I'm sitting inside a school standalone, don't have a lot of control over the naming conventions - it works good to be invalid, because validation is taken from everything else

and
I just want to get the admin error messages

and
the upstream smtp server is enforcing validation of the from email addresses (as well as the to)
Title: Re: Admin From Address
Post by: Stefano on December 11, 2008, 09:40:11 AM
Why do you wish that, and why don't you want to change it to a valid domain?

Hi Charlie..

sometimes some small (2,3 pc) firms don't have a registered domain.. so I give an invalid one, such myfirm.local..

I wish admin mails to be forwarded to my email, but, as the OP said, it's being difficult :-)

that's all..

Ciao
Stefano
Title: Re: Admin From Address
Post by: thomasch on December 11, 2008, 09:55:10 AM
I'd register server to dyndns at least. 


I wish admin mails to be forwarded to my email, but, as the OP said, it's being difficult :-)

Admin mails can be forwarded to external mail, configure it via server-manager->(Colaboration)Users.

thomas

Title: Re: Admin From Address
Post by: CharlieBrady on December 11, 2008, 12:17:01 PM
sometimes some small (2,3 pc) firms don't have a registered domain.. so I give an invalid one, such myfirm.local..

If they don't have a registered domain, they won't receive any email, and shouldn't expect to send any.

As Thomasch says, getting a legitimate domain is trivial.
Title: Re: Admin From Address
Post by: Stefano on December 11, 2008, 12:23:46 PM
@charliebrady
they use some free email account such libero.it, virgilio.it and so on.. I retrieve their mails with fetchmail

their server is registered with dyndns but only to permit me to connect via ssh from everywhere (dynamic ip on theri side)

@thomasch
I know how to forward admin's emails to another address :-) (I'm using SME since 2003)..

the problem is that outgoing mail from them is from "admin@myfirm.local" and the invalid domain is often rejected.

Ciao
Stefano
Title: Re: Admin From Address
Post by: Jáder on December 11, 2008, 09:35:59 PM
THIS IS A NEWBIE ANSWER... JUST A THOUGHT:

Couldn´t you create a sub-domain for your clients (root-accounts-clients.mydomain.com) and use it on all your clients ?

Ou create a subdomain for each one of your clientes (clientX.mydomain.com , clientY.mydomain.com, clientZ.mydomain.com, ...)  and configure each client server with this subdomain ?

Title: Re: Admin From Address
Post by: Brave Dave on December 11, 2008, 10:44:03 PM
It's only the email from the root/admin

Notices etc.

Clients can configure there own addresses
Title: Re: Admin From Address
Post by: CharlieBrady on December 11, 2008, 11:21:52 PM
the problem is that outgoing mail from them is from "admin@myfirm.local" and the invalid domain is often rejected.

So change domain name to your registered dyndns name and the problem goes away.
Title: Re: Admin From Address
Post by: stephen noble on December 12, 2008, 01:15:40 AM
http://wiki.contribs.org/Email#How_do_I_get_my_e-mail_to_show_the_correct_From_Address
Title: Re: Admin From Address
Post by: Stefano on December 12, 2008, 09:20:18 AM
Hi all

first of all, thank you for all your suggestions but..
- I know how to configure a mail client
- I know how to configure my servers
- I'm only experiencing some troubles with a couple of server (as I said, very small firms)
- I can live also with this kind of troubles :-)

anyway, this 3ad is a good point for my memory ;-)

thank you again

ciao
Stefano