cancel
Showing results for 
Search instead for 
Did you mean: 
duggieb
Beginner
327 Views
Message 1 of 18

Send an email from BT dynamic IP address

Go to solution

Having a BT landline and fibre broadband, I host my small website on a Raspberry Pi computer from home. The site has a contact form which tries to send an email to a btinternet address. However, this fails with a '553 error address not recognised' message which online searching suggests the BT mail server rejects the email as it comes from a dynamic IP address. Whilst I understand the need to fight spam, is there a way to be able send an email to a btinternet address from one of BT's own dynamic IP addresses? On a technical note, the website runs on Raspberry Pi's Raspbian operating system and the contact form is written in the PHP programming language, this calling the 'sendmail' program to send the email. 

0 Ratings
Reply
17 REPLIES 17
Distinguished Sage
Distinguished Sage
326 Views
Message 2 of 18

Re: Send an email from BT dynamic IP address

Go to solution

Why not just use an @btinternet.com email address and send using the BT SMTP server rather than your own.

0 Ratings
Reply
duggieb
Beginner
322 Views
Message 3 of 18

Re: Send an email from BT dynamic IP address

Go to solution

The 'sendmail' program sends email as from www-data@raspberrypi.com I presume if I sent the email from an email client, such as Thunderbird, then the BT mail server wouldn't complain but I cannot do that. The PHP calls the sendmail program to send the email. What I really need is advice on how to set up 'sendmail' so that the BT mail server is happy to take the email. Ultimately, the email would end up in my Gamil account - I only set up the @btinternet address in the hope it would take an email from one of BT's own dynamic addresses.

0 Ratings
Reply
Highlighted
Distinguished Sage
Distinguished Sage
318 Views
Message 4 of 18

Re: Send an email from BT dynamic IP address

Go to solution

You would be better asking on a Pi forum really.  You will always have difficulty sending directly from a dynamic address. You need to be able get the sendmail program to access either the Gmail or BT SMTP server rather than send directly.

0 Ratings
Reply
Distinguished Sage
Distinguished Sage
316 Views
Message 5 of 18

Re: Send an email from BT dynamic IP address

Go to solution
0 Ratings
Reply
duggieb
Beginner
300 Views
Message 6 of 18

Re: Send an email from BT dynamic IP address

Go to solution

Thanks for link to the Python script. I am not proficient in any way in Python so will need to take time to become familiar with the code. That said, I do not know how to call this script from my PHP code nor how it really differs in overcoming the problem of being sent from a dynamic address. As I said before, the preferred destination for the email is my existing Gmail a/c. I only registered for the btinternet address as I thought the BT mail server (SMTP) could be talked into accepting an email from one of BT's own dynamic IP addresses.

0 Ratings
Reply
Distinguished Sage
Distinguished Sage
296 Views
Message 7 of 18

Re: Send an email from BT dynamic IP address

Go to solution

The problem is you are sending from your own address, if you used either the BT or Gmail SMTP server to send there wouldn't be a problem. You are not actually using the BT SMTP server currently.

0 Ratings
Reply
duggieb
Beginner
293 Views
Message 8 of 18

Re: Send an email from BT dynamic IP address

Go to solution

Thanks for your reply. However, I don't understand the distinction between "I am sending from my own address" and "using a BT or Gmail SMTP server".  How do I go about doing the latter?

0 Ratings
Reply
Distinguished Sage
Distinguished Sage
290 Views
Message 9 of 18

Re: Send an email from BT dynamic IP address

Go to solution

If you send from either the BT or Gmail SMTP server your mail will be sent from the IP address of the server, not your IP address.

0 Ratings
Reply
duggieb
Beginner
287 Views
Message 10 of 18

Re: Send an email from BT dynamic IP address

Go to solution

Yes, I get that. Now I need to work out how to get 'sendmail' to send from the BT/Gmail server. Thanks again for your help - appreciated.

0 Ratings
Reply