Giter Club home page Giter Club logo

Comments (8)

polarathene avatar polarathene commented on September 27, 2024 2

But what I mean is that I don't know how "bad it can affect the data", in a way that I would notice only months later, for example.

It should only affect /etc/postfix/master.cf config. When you down + up that will get recreated again. So since you noticed it and quickly resolved it by recreating the container without the error present anymore there shouldn't be any issues going forward.

That file is configuration for routing mail delivery (ports 25, 465, 587), anti-virus milter, etc. Basically "I've got a connection, what should I do?", so your service should only have been temporarily affected with connections during that time.


possibly if you have a postfix-master.cf

There is an empty postfix-master.cf in my ./config mount, that DMS seems to at least touch it (leaving it empty, but updating the date modified).

That's odd, it should not be creating that file, but it doesn't expect it to be empty either if it was already there 馃槄

function __postfix__setup_override_configuration() {
__postfix__log 'debug' 'Overriding / adjusting configuration with user-supplied values'
local OVERRIDE_CONFIG_POSTFIX_MASTER='/tmp/docker-mailserver/postfix-master.cf'
if [[ -f ${OVERRIDE_CONFIG_POSTFIX_MASTER} ]]; then
while read -r LINE; do
[[ ${LINE} =~ ^[0-9a-z] ]] && postconf -P "${LINE}"
done < <(_get_valid_lines_from_file "${OVERRIDE_CONFIG_POSTFIX_MASTER}")
__postfix__log 'trace' "Adjusted '/etc/postfix/master.cf' according to '${OVERRIDE_CONFIG_POSTFIX_MASTER}'"
else
__postfix__log 'trace' "No extra Postfix master settings loaded because optional '${OVERRIDE_CONFIG_POSTFIX_MASTER}' was not provided"
fi

# Returns input after filtering out lines that are:
# empty, white-space, comments (`#` as the first non-whitespace character)
function _get_valid_lines_from_file() {
_convert_crlf_to_lf_if_necessary "${1}"
_append_final_newline_if_missing "${1}"
grep --extended-regexp --invert-match "^\s*$|^\s*#" "${1}" || true
}

Presumably something in the logic there triggered it to read a line without proper content calling postconf -P.

I don't see why it'd affect the modified timestamp of the file though. If your filesystem updates atime, that'd happen from a read.

Only way a write should be happening AFAIK is if you mounted directly to /etc/postfix/master.cf which would be bad.

from docker-mailserver.

casperklein avatar casperklein commented on September 27, 2024 1

There is an empty postfix-master.cf in my ./config mount,

If it's empty and you are not using it, get rid of it 馃憤

from docker-mailserver.

ghnp5 avatar ghnp5 commented on September 27, 2024 1

Thank you for your replies.

I've deleted the postfix-master.cf file in the config folder, recreated the container, and so far so good.
The file wasn't recreated there.
And no error log.

from docker-mailserver.

glime-ai avatar glime-ai commented on September 27, 2024

Please note that this response was created using generative AI, leveraging previously available information from the repository. This information may be helpful. However, it is our strong recommendation that you carefully consider the information before blindly applying it.

This response is generated only once - you will not be able to interact with the glime-ai.


El error que est谩s viendo en los registros, postconf: fatal: -P option requires service_name[/type[/parameter]], indica que hay un problema con la configuraci贸n de Postfix en tu archivo postfix-main.cf o postfix-master.cf. Este error ocurre cuando la opci贸n -P de postconf no se usa correctamente.

Para resolver este problema, aseg煤rate de que todas las l铆neas en tu archivo postfix-master.cf sigan el formato correcto: <service_name>/<type>/<parameter>. Aqu铆 hay algunos pasos que puedes seguir para depurar y corregir este problema:

  1. Revisa tu archivo postfix-master.cf:

    • Aseg煤rate de que cada l铆nea siga el formato correcto. Por ejemplo:
      submission/inet/smtpd_reject_unlisted_recipient=no
      
  2. Verifica el archivo user-patches.sh:

    • Si est谩s utilizando un script user-patches.sh para aplicar configuraciones personalizadas, aseg煤rate de que las l铆neas que usan postconf -P tambi茅n sigan el formato correcto.
  3. Ejecuta postconf -Mf:

    • Dentro del contenedor, ejecuta postconf -Mf sin argumentos para ver las opciones activas de master.cf. Esto puede ayudarte a identificar cualquier configuraci贸n incorrecta.
  4. Aumenta la verbosidad de los registros:

    • Configura la variable de entorno LOG_LEVEL a debug o trace para obtener m谩s detalles en los registros. Esto puede proporcionar m谩s informaci贸n sobre d贸nde est谩 ocurriendo el problema.

Aqu铆 tienes un ejemplo de c贸mo deber铆a verse una configuraci贸n correcta en postfix-master.cf:

# adjust the submission "reject_unlisted_recipient" option
submission/inet/smtpd_reject_unlisted_recipient=no

Si necesitas m谩s ayuda, puedes consultar la documentaci贸n de depuraci贸n de Docker Mailserver aqu铆.

This comment was generated by Glime.

from docker-mailserver.

ghnp5 avatar ghnp5 commented on September 27, 2024

I updated this:

smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks

(although I don't think this would have fixed it)

Then I restarted the container:

docker compose down mailserver && docker compose up -d

And the error didn't appear this time.

from docker-mailserver.

ghnp5 avatar ghnp5 commented on September 27, 2024

Just upgraded now the other machine I have (using down and up -d too), already with the updated smtpd_sender_restrictions as per my last message.

The error appeared too:

postconf: fatal: -P option requires service_name[/type[/parameter]]

Then I recreated the container again, and the error didn't appear.

Not sure why this happens on the very first run, on the upgrade, and how bad it is that this happens.

from docker-mailserver.

polarathene avatar polarathene commented on September 27, 2024

The error is related to /etc/postfix/master.cf, possibly if you have a postfix-master.cf, or we may internally use it to configure some changes during startup.

It could also be triggered by user-patches.sh if using the postconf method.


Not sure why this happens on the very first run, on the upgrade, and how bad it is that this happens.

Was the down before the upgrade + up?

There was quite a lot of changes with v14 release, be sure to have a backup copy of your data when upgrading to new major versions. Our tests don't always catch everything unfortunately 馃槗

from docker-mailserver.

ghnp5 avatar ghnp5 commented on September 27, 2024

Was the down before the upgrade + up?

Yep - I mentioned that several times in my messages above :)

be sure to have a backup copy of your data when upgrading to new major versions

Yeah, I do.
But what I mean is that I don't know how "bad it can affect the data", in a way that I would notice only months later, for example.

possibly if you have a postfix-master.cf

There is an empty postfix-master.cf in my ./config mount, that DMS seems to at least touch it (leaving it empty, but updating the date modified).

from docker-mailserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 馃搳馃搱馃帀

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.