Thread: pgAdmin 4 | Changing Mail From information!

pgAdmin 4 | Changing Mail From information!

From
Đỗ Ngọc Trí Cường
Date:
Dear all, I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). Now, I'm deploy a server of pgAdmin4 using docker technology (https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed successfully. But noư I face an issue. Our mail-server restricts to send email if the sender does not match with authenticate user (see log below). I've searched in the config and just found out the config about mail server and mail user/password. I can't find the config mail from or mail template. Could you please help me where I can modify it? ************************************************************************************************ reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' send: 'mail FROM: size=1191\r\n' reply: b'250 2.1.0 Ok\r\n' reply: retcode (250); Msg: b'2.1.0 Ok' send: 'rcpt TO:\r\n' reply: b'553 5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn\r\n' reply: retcode (553); Msg: b'5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn' send: 'rset\r\n' reply: b'250 2.0.0 Ok\r\n' reply: retcode (250); Msg: b'2.0.0 Ok' send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' ************************************************************************************************ Looking forward to your feedback. Thank you so much and best regards, Đỗ Ngọc Trí Cường (Mr.) Software Development Dept. Mobile: +84 9 3800 3394 Phone: +84 28 3715 6322 | Ext. 540 Email: dntcuong@digi-texx.vn DIGI-TEXX | a global BPO provider Address : Anna Building, Quang Trung Software City, District. 12, Ho Chi Minh City, Vietnam Website: www.digi-texx.vn IMPORTANT NOTICE: *This e-mail and any attachments may contain confidential and/or privileged information. If you are not the intended recipient, please delete it and notify the sender immediately. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. *Please consider the environment before printing.

Re: pgAdmin 4 | Changing Mail From information!

From
Dave Page
Date:
Hi On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường wrote: > Dear all, > > I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). > > Now, I'm deploy a server of pgAdmin4 using docker technology ( > https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed > successfully. But noư I face an issue. > > Our mail-server restricts to send email if the sender does not match with > authenticate user (see log below). I've searched in the config and just > found out the config about mail server and mail user/password. I can't find > the config mail from or mail template. > > Could you please help me where I can modify it? > > ************************************************************ > ************************************ > reply: b'235 2.7.0 Authentication successful\r\n' > reply: retcode (235); Msg: b'2.7.0 Authentication successful' > send: 'mail FROM: size=1191\r\n' > reply: b'250 2.1.0 Ok\r\n' > reply: retcode (250); Msg: b'2.1.0 Ok' > send: 'rcpt TO:\r\n' > reply: b'553 5.7.1 : Sender address rejected: not > owned by user mail_demo@digi-texx.vn\r\n' > reply: retcode (553); Msg: b'5.7.1 : Sender address > rejected: not owned by user mail_demo@digi-texx.vn' > send: 'rset\r\n' > reply: b'250 2.0.0 Ok\r\n' > reply: retcode (250); Msg: b'2.0.0 Ok' > send: 'quit\r\n' > reply: b'221 2.0.0 Bye\r\n' > reply: retcode (221); Msg: b'2.0.0 Bye' > ************************************************************ > ************************************ > > Looking forward to your feedback. > You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in your environment. There is a full list of available config options at http://pythonhosted.org/Flask-Mail/ which should work in addition to those shown in config.py. As a sidenote, you should create config_distro.py (alongside config.py) to contain the required settings. Don't edit config.py itself. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: pgAdmin 4 | Changing Mail From information!

From
Đỗ Ngọc Trí Cường
Date:
Dear Dave, Thankfully for your feedback. I've add this into the config_local.py, and config_distro.py as below: ########################################################################## # Mail server settings ########################################################################## # These settings are used when running in web server mode for confirming # and resetting passwords etc. # See: http://pythonhosted.org/Flask-Mail/ for more info MAIL_SERVER = os.environ['MAIL_SERVER'] MAIL_PORT = int(os.environ['MAIL_PORT']) MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' ########################################################################## But unfortunately, it stills not work although I've tried to restart the server already. Could you think is there any config file more? Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Dave Page" To: "Đỗ Ngọc Trí Cường" Cc: pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 4:14:19 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hi On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: Dear all, I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). Now, I'm deploy a server of pgAdmin4 using docker technology ( https://hub.docker.com/r/chorss/docker-pgadmin4/ ). I've deployed successfully. But noư I face an issue. Our mail-server restricts to send email if the sender does not match with authenticate user (see log below). I've searched in the config and just found out the config about mail server and mail user/password. I can't find the config mail from or mail template. Could you please help me where I can modify it? ************************************************************************************************ reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' send: 'mail FROM: size=1191\r\n' reply: b'250 2.1.0 Ok\r\n' reply: retcode (250); Msg: b'2.1.0 Ok' send: 'rcpt TO:< dntcuong@digi-texx.vn >\r\n' reply: b'553 5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn \r\n' reply: retcode (553); Msg: b'5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn ' send: 'rset\r\n' reply: b'250 2.0.0 Ok\r\n' reply: retcode (250); Msg: b'2.0.0 Ok' send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' ************************************************************************************************ Looking forward to your feedback. You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in your environment. There is a full list of available config options at http://pythonhosted.org/Flask-Mail/ which should work in addition to those shown in config.py. As a sidenote, you should create config_distro.py (alongside config.py) to contain the required settings. Don't edit config.py itself. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: pgAdmin 4 | Changing Mail From information!

From
Murtuza Zabuawala
Date:
Hello, I suspect that the mail server is rejecting your email because you're trying to send from a username which differs from the username you're logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn, which might be not the same as @digi-texx.vn -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường wrote: > Dear Dave, > > Thankfully for your feedback. > I've add this into the config_local.py, and config_distro.py as below: > > ########################################################################## > # Mail server settings > ########################################################################## > > # These settings are used when running in web server mode for confirming > # and resetting passwords etc. > # See: http://pythonhosted.org/Flask-Mail/ for more info > MAIL_SERVER = os.environ['MAIL_SERVER'] > MAIL_PORT = int(os.environ['MAIL_PORT']) > MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") > MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") > MAIL_USERNAME = os.environ['MAIL_USERNAME'] > MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] > MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") > MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' > ########################################################################## > > But unfortunately, it stills not work although I've tried to restart the > server already. > > Could you think is there any config file more? > > Thank you and best regards, > > > Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 > 3715 5325 > > ------------------------------ > *From: *"Dave Page" > *To: *"Đỗ Ngọc Trí Cường" > *Cc: *pgadmin-support@lists.postgresql.org > *Sent: *Monday, November 27, 2017 4:14:19 PM > *Subject: *Re: pgAdmin 4 | Changing Mail From information! > > Hi > > On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường > wrote: > >> Dear all, >> >> I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). >> >> Now, I'm deploy a server of pgAdmin4 using docker technology ( >> https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed >> successfully. But noư I face an issue. >> >> Our mail-server restricts to send email if the sender does not match with >> authenticate user (see log below). I've searched in the config and just >> found out the config about mail server and mail user/password. I can't find >> the config mail from or mail template. >> >> Could you please help me where I can modify it? >> >> ************************************************************ >> ************************************ >> reply: b'235 2.7.0 Authentication successful\r\n' >> reply: retcode (235); Msg: b'2.7.0 Authentication successful' >> send: 'mail FROM: size=1191\r\n' >> reply: b'250 2.1.0 Ok\r\n' >> reply: retcode (250); Msg: b'2.1.0 Ok' >> send: 'rcpt TO:\r\n' >> reply: b'553 5.7.1 : Sender address rejected: not >> owned by user mail_demo@digi-texx.vn\r\n' >> reply: retcode (553); Msg: b'5.7.1 : Sender address >> rejected: not owned by user mail_demo@digi-texx.vn' >> send: 'rset\r\n' >> reply: b'250 2.0.0 Ok\r\n' >> reply: retcode (250); Msg: b'2.0.0 Ok' >> send: 'quit\r\n' >> reply: b'221 2.0.0 Bye\r\n' >> reply: retcode (221); Msg: b'2.0.0 Bye' >> ************************************************************ >> ************************************ >> >> Looking forward to your feedback. >> > > You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in > your environment. There is a full list of available config options at > http://pythonhosted.org/Flask-Mail/ which should work in addition to > those shown in config.py. > > As a sidenote, you should create config_distro.py (alongside config.py) to > contain the required settings. Don't edit config.py itself. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > >

Re: pgAdmin 4 | Changing Mail From information!

From
Đỗ Ngọc Trí Cường
Date:
Dear Murtuza , Yes, our email server for some security reason had checked and rejected when the user (used to authenticated) and the "Email From" in Header Section. The authenticated user can not change, and now I'm trying to change the "Email From" too, but I can't find where I can configure it? Please note that, I've already try to put config below into config_local.py, and config_distro.py also. MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" To: "Đỗ Ngọc Trí Cường" Cc: "Dave Page" , pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 10:09:27 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hello, I suspect that the mail server is rejecting your email because you're trying to send from a username which differs from the username you're logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn , which might be not the same as @ digi-texx.vn -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear Dave, Thankfully for your feedback. I've add this into the config_local.py, and config_distro.py as below: ########################################################################## # Mail server settings ########################################################################## # These settings are used when running in web server mode for confirming # and resetting passwords etc. # See: http://pythonhosted.org/Flask-Mail/ for more info MAIL_SERVER = os.environ['MAIL_SERVER'] MAIL_PORT = int(os.environ['MAIL_PORT']) MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' ########################################################################## But unfortunately, it stills not work although I've tried to restart the server already. Could you think is there any config file more? Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Dave Page" < dpage@pgadmin.org > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 4:14:19 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hi On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear all, I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). Now, I'm deploy a server of pgAdmin4 using docker technology ( https://hub.docker.com/r/chorss/docker-pgadmin4/ ). I've deployed successfully. But noư I face an issue. Our mail-server restricts to send email if the sender does not match with authenticate user (see log below). I've searched in the config and just found out the config about mail server and mail user/password. I can't find the config mail from or mail template. Could you please help me where I can modify it? ************************************************************************************************ reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' send: 'mail FROM: size=1191\r\n' reply: b'250 2.1.0 Ok\r\n' reply: retcode (250); Msg: b'2.1.0 Ok' send: 'rcpt TO:< dntcuong@digi-texx.vn >\r\n' reply: b'553 5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn \r\n' reply: retcode (553); Msg: b'5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn ' send: 'rset\r\n' reply: b'250 2.0.0 Ok\r\n' reply: retcode (250); Msg: b'2.0.0 Ok' send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' ************************************************************************************************ Looking forward to your feedback. BQ_END You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in your environment. There is a full list of available config options at http://pythonhosted.org/Flask-Mail/ which should work in addition to those shown in config.py. As a sidenote, you should create config_distro.py (alongside config.py) to contain the required settings. Don't edit config.py itself. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company BQ_END

Re: pgAdmin 4 | Changing Mail From information!

From
Murtuza Zabuawala
Date:
Then MAIL_USERNAME & MAIL_DEFAULT_SENDER should be same, MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_DEFAULT_SENDER = os.environ['MAIL_USERNAME'] On Tue, Nov 28, 2017 at 7:36 AM, Đỗ Ngọc Trí Cường wrote: > Dear Murtuza, > > Yes, our email server for some security reason had checked and rejected > when the user (used to authenticated) and the "Email From" in Header > Section. > > The authenticated user can not change, and now I'm trying to change the > "Email From" too, but I can't find where I can configure it? > > Please note that, I've already try to put config below into > config_local.py, and config_distro.py also. > > MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' > > > > > Thank you and best regards, > > > Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 > 3715 5325 > > ------------------------------ > *From: *"Murtuza Zabuawala" > *To: *"Đỗ Ngọc Trí Cường" > *Cc: *"Dave Page" , pgadmin-support@lists. > postgresql.org > *Sent: *Monday, November 27, 2017 10:09:27 PM > *Subject: *Re: pgAdmin 4 | Changing Mail From information! > > Hello, > > I suspect that the mail server is rejecting your email because you're > trying to send from a username which differs from the username you're > logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn, > which might be not the same as @digi-texx.vn > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường > wrote: > >> Dear Dave, >> >> Thankfully for your feedback. >> I've add this into the config_local.py, and config_distro.py as below: >> >> ############################################################ >> ############## >> # Mail server settings >> ############################################################ >> ############## >> >> # These settings are used when running in web server mode for confirming >> # and resetting passwords etc. >> # See: http://pythonhosted.org/Flask-Mail/ for more info >> MAIL_SERVER = os.environ['MAIL_SERVER'] >> MAIL_PORT = int(os.environ['MAIL_PORT']) >> MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") >> MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") >> MAIL_USERNAME = os.environ['MAIL_USERNAME'] >> MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] >> MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") >> MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' >> ############################################################ >> ############## >> >> But unfortunately, it stills not work although I've tried to restart the >> server already. >> >> Could you think is there any config file more? >> >> Thank you and best regards, >> >> >> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >> 3715 5325 >> >> ------------------------------ >> *From: *"Dave Page" >> *To: *"Đỗ Ngọc Trí Cường" >> *Cc: *pgadmin-support@lists.postgresql.org >> *Sent: *Monday, November 27, 2017 4:14:19 PM >> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >> >> Hi >> >> On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường > > wrote: >> >>> Dear all, >>> >>> I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). >>> >>> Now, I'm deploy a server of pgAdmin4 using docker technology ( >>> https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed >>> successfully. But noư I face an issue. >>> >>> Our mail-server restricts to send email if the sender does not match >>> with authenticate user (see log below). I've searched in the config and >>> just found out the config about mail server and mail user/password. I can't >>> find the config mail from or mail template. >>> >>> Could you please help me where I can modify it? >>> >>> ************************************************************ >>> ************************************ >>> reply: b'235 2.7.0 Authentication successful\r\n' >>> reply: retcode (235); Msg: b'2.7.0 Authentication successful' >>> send: 'mail FROM: size=1191\r\n' >>> reply: b'250 2.1.0 Ok\r\n' >>> reply: retcode (250); Msg: b'2.1.0 Ok' >>> send: 'rcpt TO:\r\n' >>> reply: b'553 5.7.1 : Sender address rejected: not >>> owned by user mail_demo@digi-texx.vn\r\n' >>> reply: retcode (553); Msg: b'5.7.1 : Sender address >>> rejected: not owned by user mail_demo@digi-texx.vn' >>> send: 'rset\r\n' >>> reply: b'250 2.0.0 Ok\r\n' >>> reply: retcode (250); Msg: b'2.0.0 Ok' >>> send: 'quit\r\n' >>> reply: b'221 2.0.0 Bye\r\n' >>> reply: retcode (221); Msg: b'2.0.0 Bye' >>> ************************************************************ >>> ************************************ >>> >>> Looking forward to your feedback. >>> >> >> You should be able to set MAIL_DEFAULT_SENDER to an appropriate address >> in your environment. There is a full list of available config options at >> http://pythonhosted.org/Flask-Mail/ which should work in addition to >> those shown in config.py. >> >> As a sidenote, you should create config_distro.py (alongside config.py) >> to contain the required settings. Don't edit config.py itself. >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >

Re: pgAdmin 4 | Changing Mail From information!

From
Đỗ Ngọc Trí Cường
Date:
Dear Murtuza, Thank you so much for your support. But unfortunately, it stills not work. Then I think maybe that sender have been hard-code in a file stored somewhere, so I try to find the key-word in all folder. Luckily, I find it, in the file "site-packages/flask_security/core.py" there is one line: 'EMAIL_SENDER': 'no-reply@localhost' After that, I edit that file such as BQ_BEGIN import os 'EMAIL_SENDER': os.environ['MAIL_USERNAME'] BQ_END And it works. I don't know this is a bug or not, but I think maybe we can consider it as a environment option in the future. Once again, thank you so much for your support. I love all of you. Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" To: "Đỗ Ngọc Trí Cường" Cc: "Dave Page" , pgadmin-support@lists.postgresql.org Sent: Tuesday, November 28, 2017 12:15:24 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Then MAIL_USERNAME & MAIL_DEFAULT_SENDER should be same, MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_DEFAULT_SENDER = os.environ['MAIL_USERNAME'] On Tue, Nov 28, 2017 at 7:36 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear Murtuza , Yes, our email server for some security reason had checked and rejected when the user (used to authenticated) and the "Email From" in Header Section. The authenticated user can not change, and now I'm trying to change the "Email From" too, but I can't find where I can configure it? Please note that, I've already try to put config below into config_local.py, and config_distro.py also. BQ_BEGIN MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' BQ_END Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" < murtuza.zabuawala@enterprisedb.com > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: "Dave Page" < dpage@pgadmin.org >, pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 10:09:27 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hello, I suspect that the mail server is rejecting your email because you're trying to send from a username which differs from the username you're logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn , which might be not the same as @ digi-texx.vn -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear Dave, Thankfully for your feedback. I've add this into the config_local.py, and config_distro.py as below: ########################################################################## # Mail server settings ########################################################################## # These settings are used when running in web server mode for confirming # and resetting passwords etc. # See: http://pythonhosted.org/Flask-Mail/ for more info MAIL_SERVER = os.environ['MAIL_SERVER'] MAIL_PORT = int(os.environ['MAIL_PORT']) MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' ########################################################################## But unfortunately, it stills not work although I've tried to restart the server already. Could you think is there any config file more? Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Dave Page" < dpage@pgadmin.org > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 4:14:19 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hi On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear all, I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). Now, I'm deploy a server of pgAdmin4 using docker technology ( https://hub.docker.com/r/chorss/docker-pgadmin4/ ). I've deployed successfully. But noư I face an issue. Our mail-server restricts to send email if the sender does not match with authenticate user (see log below). I've searched in the config and just found out the config about mail server and mail user/password. I can't find the config mail from or mail template. Could you please help me where I can modify it? ************************************************************************************************ reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' send: 'mail FROM: size=1191\r\n' reply: b'250 2.1.0 Ok\r\n' reply: retcode (250); Msg: b'2.1.0 Ok' send: 'rcpt TO:< dntcuong@digi-texx.vn >\r\n' reply: b'553 5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn \r\n' reply: retcode (553); Msg: b'5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn ' send: 'rset\r\n' reply: b'250 2.0.0 Ok\r\n' reply: retcode (250); Msg: b'2.0.0 Ok' send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' ************************************************************************************************ Looking forward to your feedback. BQ_END You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in your environment. There is a full list of available config options at http://pythonhosted.org/Flask-Mail/ which should work in addition to those shown in config.py. As a sidenote, you should create config_distro.py (alongside config.py) to contain the required settings. Don't edit config.py itself. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company BQ_END BQ_END

Re: pgAdmin 4 | Changing Mail From information!

From
Murtuza Zabuawala
Date:
Oh You were talking about the security email sender, I thought it's for SMTP login. Anyways you can changed it via SECURITY_EMAIL_SENDER option in config_local.py. SECURITY_EMAIL_SENDER = os.environ['MAIL_USERNAME'] -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Tue, Nov 28, 2017 at 1:02 PM, Đỗ Ngọc Trí Cường wrote: > Dear Murtuza, > > Thank you so much for your support. But unfortunately, it stills not work. > > Then I think maybe that sender have been hard-code in a file stored > somewhere, so I try to find the key-word in all folder. Luckily, I find it, > in the file "site-packages/flask_security/core.py" there is one line: > > 'EMAIL_SENDER': 'no-reply@localhost' > > After that, I edit that file such as > > import os > 'EMAIL_SENDER': os.environ['MAIL_USERNAME'] > > > And it works. > > I don't know this is a bug or not, but I think maybe we can consider it as > a environment option in the future. > > Once again, thank you so much for your support. > > I love all of you. > > Thank you and best regards, > > > Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 > 3715 5325 > > ------------------------------ > *From: *"Murtuza Zabuawala" > *To: *"Đỗ Ngọc Trí Cường" > *Cc: *"Dave Page" , pgadmin-support@lists. > postgresql.org > *Sent: *Tuesday, November 28, 2017 12:15:24 PM > *Subject: *Re: pgAdmin 4 | Changing Mail From information! > > Then MAIL_USERNAME & MAIL_DEFAULT_SENDER should be same, > > MAIL_USERNAME = os.environ['MAIL_USERNAME'] > MAIL_DEFAULT_SENDER = os.environ['MAIL_USERNAME'] > > > On Tue, Nov 28, 2017 at 7:36 AM, Đỗ Ngọc Trí Cường > wrote: > >> Dear Murtuza, >> >> Yes, our email server for some security reason had checked and rejected >> when the user (used to authenticated) and the "Email From" in Header >> Section. >> >> The authenticated user can not change, and now I'm trying to change the >> "Email From" too, but I can't find where I can configure it? >> >> Please note that, I've already try to put config below into >> config_local.py, and config_distro.py also. >> >> MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' >> >> >> >> >> Thank you and best regards, >> >> >> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >> 3715 5325 >> >> ------------------------------ >> *From: *"Murtuza Zabuawala" >> *To: *"Đỗ Ngọc Trí Cường" >> *Cc: *"Dave Page" , pgadmin-support@lists. >> postgresql.org >> *Sent: *Monday, November 27, 2017 10:09:27 PM >> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >> >> Hello, >> >> I suspect that the mail server is rejecting your email because you're >> trying to send from a username which differs from the username you're >> logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn, >> which might be not the same as @digi-texx.vn >> >> -- >> Regards, >> Murtuza Zabuawala >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >> On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường > > wrote: >> >>> Dear Dave, >>> >>> Thankfully for your feedback. >>> I've add this into the config_local.py, and config_distro.py as below: >>> >>> ############################################################ >>> ############## >>> # Mail server settings >>> ############################################################ >>> ############## >>> >>> # These settings are used when running in web server mode for confirming >>> # and resetting passwords etc. >>> # See: http://pythonhosted.org/Flask-Mail/ for more info >>> MAIL_SERVER = os.environ['MAIL_SERVER'] >>> MAIL_PORT = int(os.environ['MAIL_PORT']) >>> MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", >>> "1") >>> MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", >>> "1") >>> MAIL_USERNAME = os.environ['MAIL_USERNAME'] >>> MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] >>> MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") >>> MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' >>> ############################################################ >>> ############## >>> >>> But unfortunately, it stills not work although I've tried to restart the >>> server already. >>> >>> Could you think is there any config file more? >>> >>> Thank you and best regards, >>> >>> >>> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >>> 3715 5325 >>> >>> ------------------------------ >>> *From: *"Dave Page" >>> *To: *"Đỗ Ngọc Trí Cường" >>> *Cc: *pgadmin-support@lists.postgresql.org >>> *Sent: *Monday, November 27, 2017 4:14:19 PM >>> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >>> >>> Hi >>> >>> On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < >>> dntcuong@digi-texx.vn> wrote: >>> >>>> Dear all, >>>> >>>> I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). >>>> >>>> Now, I'm deploy a server of pgAdmin4 using docker technology ( >>>> https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed >>>> successfully. But noư I face an issue. >>>> >>>> Our mail-server restricts to send email if the sender does not match >>>> with authenticate user (see log below). I've searched in the config and >>>> just found out the config about mail server and mail user/password. I can't >>>> find the config mail from or mail template. >>>> >>>> Could you please help me where I can modify it? >>>> >>>> ************************************************************ >>>> ************************************ >>>> reply: b'235 2.7.0 Authentication successful\r\n' >>>> reply: retcode (235); Msg: b'2.7.0 Authentication successful' >>>> send: 'mail FROM: size=1191\r\n' >>>> reply: b'250 2.1.0 Ok\r\n' >>>> reply: retcode (250); Msg: b'2.1.0 Ok' >>>> send: 'rcpt TO:\r\n' >>>> reply: b'553 5.7.1 : Sender address rejected: not >>>> owned by user mail_demo@digi-texx.vn\r\n' >>>> reply: retcode (553); Msg: b'5.7.1 : Sender >>>> address rejected: not owned by user mail_demo@digi-texx.vn' >>>> send: 'rset\r\n' >>>> reply: b'250 2.0.0 Ok\r\n' >>>> reply: retcode (250); Msg: b'2.0.0 Ok' >>>> send: 'quit\r\n' >>>> reply: b'221 2.0.0 Bye\r\n' >>>> reply: retcode (221); Msg: b'2.0.0 Bye' >>>> ************************************************************ >>>> ************************************ >>>> >>>> Looking forward to your feedback. >>>> >>> >>> You should be able to set MAIL_DEFAULT_SENDER to an appropriate address >>> in your environment. There is a full list of available config options at >>> http://pythonhosted.org/Flask-Mail/ which should work in addition to >>> those shown in config.py. >>> >>> As a sidenote, you should create config_distro.py (alongside config.py) >>> to contain the required settings. Don't edit config.py itself. >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >>> >> >

Re: pgAdmin 4 | Changing Mail From information!

From
Đỗ Ngọc Trí Cường
Date:
Dear Murtuza, Wow, it works, thank you so much. Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" To: "Đỗ Ngọc Trí Cường" Cc: "Dave Page" , pgadmin-support@lists.postgresql.org Sent: Tuesday, November 28, 2017 2:52:37 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Oh You were talking about the security email sender, I thought it's for SMTP login. Anyways you can changed it via SECURITY_EMAIL_SENDER option in config_local.py. SECURITY_EMAIL_SENDER = os.environ['MAIL_USERNAME'] -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Tue, Nov 28, 2017 at 1:02 PM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: Dear Murtuza, Thank you so much for your support. But unfortunately, it stills not work. Then I think maybe that sender have been hard-code in a file stored somewhere, so I try to find the key-word in all folder. Luckily, I find it, in the file "site-packages/flask_security/core.py" there is one line: BQ_BEGIN 'EMAIL_SENDER': 'no-reply@localhost' After that, I edit that file such as BQ_BEGIN import os 'EMAIL_SENDER': os.environ['MAIL_USERNAME'] BQ_END And it works. I don't know this is a bug or not, but I think maybe we can consider it as a environment option in the future. Once again, thank you so much for your support. I love all of you. Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" < murtuza.zabuawala@enterprisedb.com > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: "Dave Page" < dpage@pgadmin.org >, pgadmin-support@lists.postgresql.org Sent: Tuesday, November 28, 2017 12:15:24 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Then MAIL_USERNAME & MAIL_DEFAULT_SENDER should be same, MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_DEFAULT_SENDER = os.environ['MAIL_USERNAME'] On Tue, Nov 28, 2017 at 7:36 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear Murtuza , Yes, our email server for some security reason had checked and rejected when the user (used to authenticated) and the "Email From" in Header Section. The authenticated user can not change, and now I'm trying to change the "Email From" too, but I can't find where I can configure it? Please note that, I've already try to put config below into config_local.py, and config_distro.py also. BQ_BEGIN MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' BQ_END Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Murtuza Zabuawala" < murtuza.zabuawala@enterprisedb.com > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: "Dave Page" < dpage@pgadmin.org >, pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 10:09:27 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hello, I suspect that the mail server is rejecting your email because you're trying to send from a username which differs from the username you're logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn , which might be not the same as @ digi-texx.vn -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear Dave, Thankfully for your feedback. I've add this into the config_local.py, and config_distro.py as below: ########################################################################## # Mail server settings ########################################################################## # These settings are used when running in web server mode for confirming # and resetting passwords etc. # See: http://pythonhosted.org/Flask-Mail/ for more info MAIL_SERVER = os.environ['MAIL_SERVER'] MAIL_PORT = int(os.environ['MAIL_PORT']) MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", "1") MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", "1") MAIL_USERNAME = os.environ['MAIL_USERNAME'] MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") MAIL_DEFAULT_SENDER = ' mail_demo@digi-texx.vn ' ########################################################################## But unfortunately, it stills not work although I've tried to restart the server already. Could you think is there any config file more? Thank you and best regards, Đỗ Ngọc Trí Cường (Mr.) | Software Development Department | +84 28 3715 5325 From: "Dave Page" < dpage@pgadmin.org > To: "Đỗ Ngọc Trí Cường" < dntcuong@digi-texx.vn > Cc: pgadmin-support@lists.postgresql.org Sent: Monday, November 27, 2017 4:14:19 PM Subject: Re: pgAdmin 4 | Changing Mail From information! Hi On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < dntcuong@digi-texx.vn > wrote: BQ_BEGIN Dear all, I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). Now, I'm deploy a server of pgAdmin4 using docker technology ( https://hub.docker.com/r/chorss/docker-pgadmin4/ ). I've deployed successfully. But noư I face an issue. Our mail-server restricts to send email if the sender does not match with authenticate user (see log below). I've searched in the config and just found out the config about mail server and mail user/password. I can't find the config mail from or mail template. Could you please help me where I can modify it? ************************************************************************************************ reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' send: 'mail FROM: size=1191\r\n' reply: b'250 2.1.0 Ok\r\n' reply: retcode (250); Msg: b'2.1.0 Ok' send: 'rcpt TO:< dntcuong@digi-texx.vn >\r\n' reply: b'553 5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn \r\n' reply: retcode (553); Msg: b'5.7.1 : Sender address rejected: not owned by user mail_demo@digi-texx.vn ' send: 'rset\r\n' reply: b'250 2.0.0 Ok\r\n' reply: retcode (250); Msg: b'2.0.0 Ok' send: 'quit\r\n' reply: b'221 2.0.0 Bye\r\n' reply: retcode (221); Msg: b'2.0.0 Bye' ************************************************************************************************ Looking forward to your feedback. BQ_END You should be able to set MAIL_DEFAULT_SENDER to an appropriate address in your environment. There is a full list of available config options at http://pythonhosted.org/Flask-Mail/ which should work in addition to those shown in config.py. As a sidenote, you should create config_distro.py (alongside config.py) to contain the required settings. Don't edit config.py itself. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company BQ_END BQ_END BQ_END

Re: pgAdmin 4 | Changing Mail From information!

From
Dave Page
Date:
Oh, so Flask-Security was overriding the setting for MAIL_DEFAULT_SENDER in Flask-Mail? Good catch - I'll add that to the config file for reference purposes. On Tue, Nov 28, 2017 at 8:29 AM, Đỗ Ngọc Trí Cường wrote: > Dear Murtuza, > > Wow, it works, thank you so much. > > Thank you and best regards, > > > Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 > 3715 5325 <+84%2028%203715%205325> > > ------------------------------ > *From: *"Murtuza Zabuawala" > *To: *"Đỗ Ngọc Trí Cường" > *Cc: *"Dave Page" , pgadmin-support@lists.postgres > ql.org > *Sent: *Tuesday, November 28, 2017 2:52:37 PM > > *Subject: *Re: pgAdmin 4 | Changing Mail From information! > > Oh You were talking about the security email sender, I thought it's for > SMTP login. > > Anyways you can changed it via SECURITY_EMAIL_SENDER option in > config_local.py. > > SECURITY_EMAIL_SENDER = os.environ['MAIL_USERNAME'] > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > On Tue, Nov 28, 2017 at 1:02 PM, Đỗ Ngọc Trí Cường > wrote: > >> Dear Murtuza, >> >> Thank you so much for your support. But unfortunately, it stills not work. >> >> Then I think maybe that sender have been hard-code in a file stored >> somewhere, so I try to find the key-word in all folder. Luckily, I find it, >> in the file "site-packages/flask_security/core.py" there is one line: >> >> 'EMAIL_SENDER': 'no-reply@localhost' >> >> After that, I edit that file such as >> >> import os >> 'EMAIL_SENDER': os.environ['MAIL_USERNAME'] >> >> >> And it works. >> >> I don't know this is a bug or not, but I think maybe we can consider it >> as a environment option in the future. >> >> Once again, thank you so much for your support. >> >> I love all of you. >> >> Thank you and best regards, >> >> >> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >> 3715 5325 <+84%2028%203715%205325> >> >> ------------------------------ >> *From: *"Murtuza Zabuawala" >> *To: *"Đỗ Ngọc Trí Cường" >> *Cc: *"Dave Page" , pgadmin-support@lists.postgres >> ql.org >> *Sent: *Tuesday, November 28, 2017 12:15:24 PM >> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >> >> Then MAIL_USERNAME & MAIL_DEFAULT_SENDER should be same, >> >> MAIL_USERNAME = os.environ['MAIL_USERNAME'] >> MAIL_DEFAULT_SENDER = os.environ['MAIL_USERNAME'] >> >> >> On Tue, Nov 28, 2017 at 7:36 AM, Đỗ Ngọc Trí Cường > > wrote: >> >>> Dear Murtuza, >>> >>> Yes, our email server for some security reason had checked and rejected >>> when the user (used to authenticated) and the "Email From" in Header >>> Section. >>> >>> The authenticated user can not change, and now I'm trying to change the >>> "Email From" too, but I can't find where I can configure it? >>> >>> Please note that, I've already try to put config below into >>> config_local.py, and config_distro.py also. >>> >>> MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' >>> >>> >>> >>> >>> Thank you and best regards, >>> >>> >>> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >>> 3715 5325 <+84%2028%203715%205325> >>> >>> ------------------------------ >>> *From: *"Murtuza Zabuawala" >>> *To: *"Đỗ Ngọc Trí Cường" >>> *Cc: *"Dave Page" , pgadmin-support@lists.postgres >>> ql.org >>> *Sent: *Monday, November 27, 2017 10:09:27 PM >>> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >>> >>> Hello, >>> >>> I suspect that the mail server is rejecting your email because you're >>> trying to send from a username which differs from the username you're >>> logging in as, e.g. you've set the From: to be mail_demo@digi-texx.vn, >>> which might be not the same as @digi-texx.vn >>> >>> -- >>> Regards, >>> Murtuza Zabuawala >>> EnterpriseDB: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >>> >>> On Mon, Nov 27, 2017 at 5:49 PM, Đỗ Ngọc Trí Cường < >>> dntcuong@digi-texx.vn> wrote: >>> >>>> Dear Dave, >>>> >>>> Thankfully for your feedback. >>>> I've add this into the config_local.py, and config_distro.py as below: >>>> >>>> ############################################################ >>>> ############## >>>> # Mail server settings >>>> ############################################################ >>>> ############## >>>> >>>> # These settings are used when running in web server mode for confirming >>>> # and resetting passwords etc. >>>> # See: http://pythonhosted.org/Flask-Mail/ for more info >>>> MAIL_SERVER = os.environ['MAIL_SERVER'] >>>> MAIL_PORT = int(os.environ['MAIL_PORT']) >>>> MAIL_USE_SSL = os.environ['MAIL_USE_SSL'].lower() in ("yes", "true", >>>> "1") >>>> MAIL_USE_TLS = os.environ['MAIL_USE_TLS'].lower() in ("yes", "true", >>>> "1") >>>> MAIL_USERNAME = os.environ['MAIL_USERNAME'] >>>> MAIL_PASSWORD = os.environ['MAIL_PASSWORD'] >>>> MAIL_DEBUG = os.environ['MAIL_DEBUG'].lower() in ("yes", "true", "1") >>>> MAIL_DEFAULT_SENDER = 'mail_demo@digi-texx.vn' >>>> ############################################################ >>>> ############## >>>> >>>> But unfortunately, it stills not work although I've tried to restart >>>> the server already. >>>> >>>> Could you think is there any config file more? >>>> >>>> Thank you and best regards, >>>> >>>> >>>> Đỗ Ngọc Trí *Cường* (Mr.) | *Software Development Department* | +84 28 >>>> 3715 5325 <+84%2028%203715%205325> >>>> >>>> ------------------------------ >>>> *From: *"Dave Page" >>>> *To: *"Đỗ Ngọc Trí Cường" >>>> *Cc: *pgadmin-support@lists.postgresql.org >>>> *Sent: *Monday, November 27, 2017 4:14:19 PM >>>> *Subject: *Re: pgAdmin 4 | Changing Mail From information! >>>> >>>> Hi >>>> >>>> On Mon, Nov 27, 2017 at 6:53 AM, Đỗ Ngọc Trí Cường < >>>> dntcuong@digi-texx.vn> wrote: >>>> >>>>> Dear all, >>>>> >>>>> I'm new from pgAdmin4 (I normally used pgAdmin3 in the past). >>>>> >>>>> Now, I'm deploy a server of pgAdmin4 using docker technology ( >>>>> https://hub.docker.com/r/chorss/docker-pgadmin4/). I've deployed >>>>> successfully. But noư I face an issue. >>>>> >>>>> Our mail-server restricts to send email if the sender does not match >>>>> with authenticate user (see log below). I've searched in the config and >>>>> just found out the config about mail server and mail user/password. I can't >>>>> find the config mail from or mail template. >>>>> >>>>> Could you please help me where I can modify it? >>>>> >>>>> ************************************************************ >>>>> ************************************ >>>>> reply: b'235 2.7.0 Authentication successful\r\n' >>>>> reply: retcode (235); Msg: b'2.7.0 Authentication successful' >>>>> send: 'mail FROM: size=1191\r\n' >>>>> reply: b'250 2.1.0 Ok\r\n' >>>>> reply: retcode (250); Msg: b'2.1.0 Ok' >>>>> send: 'rcpt TO:\r\n' >>>>> reply: b'553 5.7.1 : Sender address rejected: not >>>>> owned by user mail_demo@digi-texx.vn\r\n' >>>>> reply: retcode (553); Msg: b'5.7.1 : Sender >>>>> address rejected: not owned by user mail_demo@digi-texx.vn' >>>>> send: 'rset\r\n' >>>>> reply: b'250 2.0.0 Ok\r\n' >>>>> reply: retcode (250); Msg: b'2.0.0 Ok' >>>>> send: 'quit\r\n' >>>>> reply: b'221 2.0.0 Bye\r\n' >>>>> reply: retcode (221); Msg: b'2.0.0 Bye' >>>>> ************************************************************ >>>>> ************************************ >>>>> >>>>> Looking forward to your feedback. >>>>> >>>> >>>> You should be able to set MAIL_DEFAULT_SENDER to an appropriate address >>>> in your environment. There is a full list of available config options at >>>> http://pythonhosted.org/Flask-Mail/ which should work in addition to >>>> those shown in config.py. >>>> >>>> As a sidenote, you should create config_distro.py (alongside config.py) >>>> to contain the required settings. Don't edit config.py itself. >>>> >>>> -- >>>> Dave Page >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>>> >>>> EnterpriseDB UK: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>>> >>> >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company