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.

In response to the answers to this question I tried to set up the correct 'from', 'sender' and 'return-path'. I am not sure how this is set up in .net (particularly 'return-path'), but I have set the following:

mail.From = email@client.com;
mail.ReplyTo = email@client.com;
mail.Sender = email@mycompany.com;

I set up an spf record on my dns, but then I was getting some 550 errors and emails being failed to be delivered. (Most emails were delivered, but only some returned 550 errors).

When I researched the error I found that it might be caused by the spf not containing the domain of 'From' email address?

Or perhaps my client's email server needs to have a valid spf record?

Or should I use the 'include' statement in my spf record and include my clients domain? This might be impractical as I may have up to 100 clients and the spf record is limited to 255 chars.

Or maybe I have set up the email object incorrectly?

Or is my domain supposed to be in the spf record stored on the companies server for which I am sending emails on their behalf?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

SPF controls which servers can send mail on behalf of a particular domain name.

The SPF record is a TXT type DNS record, and should be set up for the domain name you are sending email for, NOT the domain name of your mail server (unless they are the same).

The Sender Policy Framework site is very helpful for reference, and includes an SPF calculator that will help you write your SPF entry, and links to an SPF record tester that will check any SPF entries for any domain.

share|improve this answer
    
Thanks, that's really pointed me in the right direction. Just trying to fight my way through all the information. I never realised that email has quite a bit to it behind the scenes. I am really a software developer entering unfamiliar waters. –  ptutt Sep 27 '10 at 11:54

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.