Changing the "From" address when integrating SendMail with Rails 3 - ruby-on-rails-3

I recently installed SendMail on my system to use for sending email from a Rails3 project. The installation went fine and I was sending emails in no time. The only problem is, when a user receives an email, the "From" address has a hostname of echo4.bluehornet.com
I followed a tip here and everything ran with no errors, but it did not change the results.
My guess is that my emails are being proxied through whatever SMTP server SendMail is configured to use. Is there any way around this? Can I configure things so that the "From" address shows up with the domain I want?
Thanks!

You'll need to configure sendmail to "masquerade" as a different host. It was the numerous times when I delved into the sendmail.cf (or sendmail.mc which you can compile to sendmail.cf) that I sought an alternative.
I decided for my purposes (typically acting as a relay server from an application to my main SMTP service), postfix is significantly easier to configure, and easier still is exim. Actually, I don't mean to throw anything except sendmail under the bus -- postfix is a full-featured email server, just about 50x easier to set up, especially for this kind of thing.
My best advice is to use Exim (or postfix, if it's installed already) to relay to a mail-sending service like SendGrid, which makes all of the headaches of mail sending go bye-bye. If you're using Amazon AWS, they have a new mail sending service as well.

Related

How is discord api detecting your ip?

How is the discord API detecting your IP when rate-limiting your computer?
Even by doing requests trough tor and resetting the connection every 5 requests to change my IP, it still rates limit me (you probably know what I am doing, just note that it's for fun, quarantine is boring)
How does it know it still your computer? How does it work?
Exposing an IP is a fundamental part of how the internet works. When you connect to a service, you are sending data to its IP address, including your IP address so that the service may reply to you. There's no way around this, as if the IP given was incorrect, you would not get a reply from that service. Changing your IP using a proxy, VPN, or like you've been using, TOR, is still exposing the IP address of the end point of the proxy, so that the service can respond to the proxy and have the proxy send the request back to you.
Typically, if you are hitting rate-limits that often, you are doing something which is not permitted by the service you are using. If you continually hit rate-limits, the service will catch on and apply harsher rate limits, or even terminate your account. In discord especially, hitting rate-limits that often would indicate you are performing requests with malicious intent. If that's not true, you should re-evaluate how you're going about what you're doing, as there will be a better solution to your problem.

Cocoa server with user friendly automatic port forwarding or external ip lookup

I am coding a mac app, which will be a server that serve files to each user's mobile device.
The issues with this of course are getting the actual ip/port of the server host, as it will usually be inside of a home network. If the ip/port changes, its no big as i plan to send that info to a middle-man-server first, and have my mobile app get the info from there.
I have tried upnp with https://code.google.com/p/tcmportmapper/ but even though I know my router supports upnp, the library does not work as intended.
I even tried running a TURN server on my amazon ec2 instance, but i had a very hard time figuring how what message to communicate with it to get the info i need.
I've been since last night experimenting with google's libjingle, but am having a hard time even getting the provided ios example to run.
Any advice on getting this seemingly difficult task accomplished?
The port of your app will not change. The IP change could be handled by posting your servers IP to a web service every hour or whatever time period you want.
Server should run a URL http://your-web-service.com/serverip.php?ip=your-updated-ip and then have your serverip.php handle the rest (put it into a mySQL db or something)
When your client start it should ask your site for the IP and then connect to your server with that.
This is a pretty common way of handling this type of things.

IIS 6.0 SMTP NDR SPAM Backscatter

We have a IIS 6.0 server on AWS EC2 that is receiving emails and forwarding onto another IIS box, we are inadvertently sending NDR emails via the SMTP service to the forged From: header with the spam attached.
A few quick questions regarding IIS 6.0 SMTP
From reading we don't see a was to stop NDRs (this is by design to meet RFC requirements)
As we accept all emails sent to our address and process off line on a seperate machine can someone advise why NDR's are been delivered in the first place? Is there some other loophole they are using to force the SMTP server to generate Delayed and Non Delivery Reports?
Also can anyone recommend software that can stop this type of attack. e.g. Toriss, ORF from Vamsoft
You have to use SPF on the receiving machine so it does not accept mails with forged reverse-paths. There is no way to really fix the issue later in the mail server chain. (Note that the SMTP reverse path is not necessarily the same as the address in the From header, for example they always differ in list mails. If IIS does send bounce mails to the From address instead of the reverse-path then it is horribly broken.) If IIS does not know SPF, then you have to use a different mail server or an SMTP proxy.

Port 25 open / Postfix installed, but no mail being sent out

I've installed Postfix, opened port 25 (as well as ports 110, 995, 143, and 993) on my local computer connected to the Internet, but none of the e-mails that I am attempting to send out using the localhost:25 definition are being properly routed to their destination. Basically, I am trying to set up a local SMTP server to send out e-mails from my production website's software (also hosted on the same local computer).
I am using Verizon FIOS Internet service, who reportedly blocks port 25 (but actually does not in my case, as I have enabled it and checked that is in fact accessible from my external IP address). I have attempted to send the e-mail using no Smart Host, then using Verizon's SMTP server as a Smart Host, and finally using Verizon/Yahoo's SMTP server as a Smart Host, but none of them have worked.
What could be causing this issue?
I really appreciate any help on this problem, because I've been working to no success on it for the past three hours. Thank you all in advance!
absolutely, it's very common for large ISPs to block outbound connections on port 25 ~ they do this specifically to prevent what you are attempting. You should give them a call and verify if this is the case.
OR
See if you can configure your postfix to authenticate on your verizon mail account and relay your mail through that. [actually I did exactly this ~ I'll see if I can dig up the config]
-sean
UPDATE
here we go:
relayhost = [smtp.gmail.com]:587
smtpd_sasl_auth_enable = no
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
Sorry, I'm a little crunched on time, you'll have to dig up the docs for postfix relaying and how to setup the password maps [cause I don't recall offhand]
Hope his helps...
Have you setup MX record in DNS (reverse DNS must work properly) and the respective domain name (FDQN) in the smpt demon ?

"network location cannot be reached" error in IIS6

I am troubleshooting an issue with IIS6 where all sites bound to ip addresses other than the default give an error message "network location cannot be reached" when trying to start any of these sites.
The nic has all the ip addresses configured.
When I do a httpcfg query iplisten, I see only the default ip address.
When I added them with httpcfg, then all the web sites stopped working so I figured I didn something wrong so I removed them.
Two questions:
1- Why are those websites refusing to start?
2- What should be in the result of httpcfg query iplisten? All ip addresses or just one?
The websites used to work fine and something has changed. I applied a few Windows updates but I am not sure if they broke anything (I doubt it.. otherwise hundreds of web hosting companies would be screaming)
The solution was to use httpcfg without specifying the port number.
Sometimes there are bugs wehn applying windows updates. One thing you might try is running aspnet_regiis /i or /c. I'm not sure if that's your problem but it's certainly worth a shot.
That message generally comes from Windows networking (it's one of ERROR_NETWORK_UNREACHABLE, ERROR_HOST_UNREACHABLE, ERROR_PROTOCOL_UNREACHABLE - you can search for error messages in WinError.h).
Have you set up virtual directories to point at network shares on another machine? If so, check connectivity to that machine.