Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - beedno

Pages: [1]
1
hi, thanks a lot, i got a step with your instructions, i just have one problem.

When I send a mail user@domain.com it is sent from the mail configured in /etc/postfix/sender_relay instead of the user@domain.com, I don't know why


Thank you very much in advance

Hello,

I’m glad at least the email works for you.
Did you add that domain in the list of your email domain?

Also, if you receive email using gmail, gmail will tell your where it is being relayed, which is the main domain of your server.

2
Greetings!

This is a Tutorial. Not a question. But before I get there I want to say something...

I spent so much time trying to figure out how to resolve the problem. This problem is when your dedicated or VPS servers blocks port 25.

The CentOS Web Panel team create this amazing Web Panel, which I love to use the most compare to any other other web panels.

What I don't understand is why they failed to provide support or create a working tutorial so everyone to benefit from because CWP utilize postfix as a mail server.

Their main tutorial blog doesn't work. What a failed! But I can't really blame CWP for this as postfix is also a standalone email server.
This article should be taken down because it is not complete or confusing, or perhaps it should be fixed: https://wiki.centos-webpanel.com/how-to-setup-remote-smtp-server-as-relay
The third party smtp relay service does not even give us their SMTP IP address since they use a proxy. I think that tutorial only works if you own another mailserver that does not has port 25 blocked.

Because it does not work. If it works, not a lot of people will come here seeking answers for the same problem.

Here are the list of topics that simply does not work:
http://forum.centos-webpanel.com/index.php?topic=676.0


The only topic I see that work is this one: http://forum.centos-webpanel.com/index.php?topic=9963.msg34954#msg34954
Thank you very much!

My method is a bit different.


Here are example of topics people try to get it solve, yet no solutions. Sad... CWP team can't help them or provide a working tutorial:
http://forum.centos-webpanel.com/index.php?topic=6186.0
http://forum.centos-webpanel.com/index.php?topic=8754.0
https://forum.centos-webpanel.com/e-mail/how-to-change-port-mail-server-my-isp-blocked-port-2526/
https://forum.centos-webpanel.com/index.php?topic=8956.msg31330#msg31330
https://forum.centos-webpanel.com/index.php?topic=3244.msg11820#msg11820
https://forum.centos-webpanel.com/index.php?topic=3716.msg12935#msg12935
https://forum.centos-webpanel.com/index.php?topic=5634.msg19572#msg19572
https://forum.centos-webpanel.com/index.php?topic=5365.msg18664#msg18664
https://forum.centos-webpanel.com/index.php?topic=6317.msg21870#msg21870


Here's the main tutorial:



Take a look at the following two photos

Photo 1:


Photo 2:



There are many email ports, but not all of them are the same. You can't simply replace their job.

Common Email Submission Ports are: 587, 465, 2525
The Only Email Relaying Port is: 25
Common Email Receiving Ports are: 143, 993, 110, 995

Now, many people are trying to solve this problem ask how to change replace port 25 with another port! That is not possible. The only port that is used between one MailServer to another MailServer is port 25. It means that you can't set one your EmailServer to send an email to another EmailServer on the interent with another port. There is no exception. So please do not ask how to replace Port 25 with another port.

Ports: 587, 465, and 2525 are use to submit email. It means that it is the port that use in the connection between your PHONE, Personal Computer, Email Clients, to the MailServer.

And port 143, 993, 110, 995 are use for receiving email. But this topic is not about receiving email. It is about sending emails.

The only way to solve this problem is to use a third party SMTP relay service such as Sendgrid, Pepipost, MailGun, etc...
Or simply just use another server that allows port 25.

Let's assume you can't really use any server that allows port 25. That's what this tutorial is for.

Use third Party Relay Service.

Once you set up an account with the third party service, add and verify all domain names that you use in your Centos Web Panel (CWP).

**Verifying domain means you setup the TXT records at your Domain's DNS registrar or CWP DNS Zone config to verify it.**

Once you've verified all domains,
you should obtain the SMTP server credentials.

The SMTP server credentials look like this:

SMTP Host: smtp.server.com
SMTP Protocol: TLS or SSL or Plain
SMTP Port: 587 or 465 or 2525 (Note, if they provide 25, don't use it, since your server provider blocked it)
SMTP Username: YourUsername
SMTP Password: YourPassword

Once you've done that. Do these steps:

Step 1
Make sure the SASL authentication framework, and mailx are all installed.

Login to your server Terminal as root.

And run the following command:
Code: [Select]
# yum -y install cyrus-sasl-plain mailx

Step 2

In /etc/postfix/main.cf , Add the following lines
Code: [Select]
#Relay
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
header_size_limit = 4096000

Step 3

Create a file call sender_relay at /etc/postfix/

The path to that file should be /etc/postfix/sender_relay

In /etc/postfix/sender_relay, add domains that must go through a relay along with the smtp server and port that was provided to me.

For example, if I have the following domains:
example.com
helloworld.com
niceday.com

The SMTP server provided to me was smtp.server.com with port 587

I will add the following:
Code: [Select]
@example.com            smtp.server.com:587
@helloworld.com         smtp.server.com:587
@niceday.com            smtp.server.com:587

Make sure the @ is added in the front of each domain for this step.
Just to be clear, the smtp.server.com is actually the server provided to you by the third party SMTP relay service such as example.
For example, Mailgun use smtp.mailgun.org and port 587  <-- you put that as smtp.mailgun.org:587


Step 4
In /etc/postfix/sasl_passwd

provide credentials to the smtp server that listed in /etc/postfix/sender_relay

In this step, provide your SMTP server relay credentials at /etc/postfix/sasl_passwd

Code: [Select]
smtp.server.com:587   YourUsername:YourPassword


Note that smtp.server.com:587 and YourUsername and YourPassword is provided to you by the third SMTP relay service such as Sendgrid, Mailgun, pepipost, etc..

Step 5

Runs the following commands in your server terminals:

Code: [Select]
# postmap sasl_passwd sender_relay
# postfix reload

Step 6
Now you can flush the email queue (attempt to deliver the previous emails).
Code: [Select]
# postqueue -f


DONE!
At this point, it should work. If it does not work, please try to troubleshoot it with the following instructions below



If you counter any problems, try these troubleshoots:


The maillog can be reviewed if the test message is not successfully delivered. Open another shell and run tail while performing another test.
Code: [Select]
tail -f /var/log/maillog

If there are not enough details in the maillog to determine the problem, then the debug level can be increased by adding the following lines to the /etc/postfix/main.cf.

Code: [Select]
debug_peer_list=smtp-relay.rubel.com
debug_peer_level=3


The Postfix configuration must be reloaded after updating the main.cf file.
Code: [Select]
systemctl reload postfix

Remember to remove the debug settings when testing is complete. The verbose logs can have a negative impact on server performance.


Optional Steps:
Access to the sasl_passwd files should be restricted. ( If needed )

Code: [Select]
# chown root:postfix /etc/postfix/sasl_passwd*
# chmod 640 /etc/postfix/sasl_passwd*

or

Code: [Select]
# chmod 600 sasl_passwd
# chown root:root sasl_passwd


I will keep an eye on this topic just in case you guys are still needing help.

3
All Centos Web Panel Websites homepage downloads a blank file named “download”. This problem started to happen randomly.

I am wondering what causes this problem exactly and how to fix it permanently with Centos Web Panel?

There is nothing wrong with the files in my web app because this problem happen across sites with different website domains with different type of web applications.

The only fix I can find is, rebuilding the webserver in admin cwp, and then all my websites are working again. But it the problem go back after a few hours.

I am currently using nginx -> apache -> php-fpm as a webserver, and I rebuild this webserver to resolves this problem. But the problem keeps going back.

I've been using Centos Web Panel for almost over a year now, and this problem just started to happen randomly. Please help.


4
yes, i am getting ddos everyday. I also make another topic on how to resolve it using mod security.

Anyway, any recommended to for high traffic site? Do I need to set up to increaes workers?

5
CSF Firewall / How to block an IP from access my sites?
« on: January 12, 2021, 02:54:34 AM »
Hello,

I have this unknown person, who tried to attack my site all the time, but the good thing is, he/she only uses one IP to attack me. He's obviously a competitor.

I notice my site is being attacked once a day, but each day a different single IP address.

Anyway, is there a way to use CWP to block an IP automatically when the request is too much in a second?

How exactly do we block an IP manually if there is no automatic way?

This person is sending request to my site, at the rate of 1000 request per second on my site, which is already busy, causing my site to load slow and sometimes it gets a timeout error.

I can see the thousands of request each second on my cloudflare. Cloudflare offer a feature called "rate limiting" which blocks IP if an IP address request too many at a time, but this cost money.

I am looking for a way to do this using CWP for free.

6
Hello everyone. I am hoping professional users of CentOS Web Panel to help me set up CentOS Web Panel to run on super heavy traffic dynamic site.

I understand that the default configurations work for the majority of websites.

Let's imagine that I have a forum site that has 3000 active members, and 2000 guests online at the same time, at any given time.
Each of the members is posting content every 30 seconds. And each of the guests is clicking on pages every 15 seconds.

Total of 5000 visitors clicking on pages every 10-30 seconds on average.

Now my physical server is:
12 Core (24 threads) Xeon 2.50Ghz
32 GB RAM
1TB SSD

Now, please help me figure out what is the best configuration for these configs file in CentOS Web Panel, to make sure my server can handle the traffic described above.

So Far, I've done the following:

I set my webserver to:
nginx -> apache -> php-fpm

I increased the MySQL global connection allowance:
I set
max_connections = 5000
at
Code: [Select]
/etc/my.cnf.d/server.cnfjust below [mysqld]

I've increase some of my PHP memory as required by the forums I am using.

I've added my site to Cloudflare for their free CDN.

The question is, what else should I be aware of?

Because right now, my site sometime is down, or has a connection timeout.


I've heard about child process or idle workers and stuff like that but I am not sure how to set them up.
How to increase the allowance of workers in order to help me run the site I'm talking about above.

Pages: [1]